forked from fossasia/pslab-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload-apk.sh
31 lines (24 loc) · 838 Bytes
/
upload-apk.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
#create a new directory that will contain out generated apk
mkdir $HOME/buildApk/
#copy generated apk from build folder and README.md to the folder just created
cp -R app/build/outputs/apk/app-debug.apk $HOME/buildApk/
cp -R README.md $HOME/buildApk/
#setup git
cd $HOME
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
#clone the repository in the buildApk folder
git clone --quiet --branch=apk https://fossasia:[email protected]/fossasia/pslab-android apk > /dev/null
cd apk
cp -Rf $HOME/buildApk/* ./
git checkout --orphan workaround
git add -A
#add files
#git add -f .
#commit and skip the tests
git commit -am "Travis build pushed [skip ci]"
git branch -D apk
git branch -m apk
#push to the branch apk
git push origin apk --force --quiet> /dev/null