forked from fossasia/phimpme-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload-apk.sh
More file actions
executable file
·28 lines (22 loc) · 810 Bytes
/
upload-apk.sh
File metadata and controls
executable file
·28 lines (22 loc) · 810 Bytes
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
#!/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 "noreply@travis.com"
git config --global user.name "Travis CI"
#clone the repository in the buildApk folder
git clone --quiet --branch=apk https://fossasia:$GITHUB_API_KEY@github.com/fossasia/phimpme-android apk > /dev/null
cp -Rf $HOME/buildApk/*
cd apk
git checkout --orphan workaround
git add -A
#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