-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·52 lines (35 loc) · 936 Bytes
/
deploy.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
echo -e "\033[0;32mDeploying lomoimpt.zip to GitHub...\033[0m"
### mm/dd/yyyy ###
now=$(date +'%Y-%m-%d_%H-%M-%S')
echo $now
#rm -fr *.zip
### $1
orig_apk_path=$1
echo "orig_apk_path="$orig_apk_path
if [[ "$orig_apk_path" == "" ]]; then
orig_apk_path='/h/myproject/lomoware/lomo-android/app/release/'
fi
### $2
orig_apk_file=$2
echo "orig_apk_file="$orig_apk_file
if [[ "$orig_apk_file" == "" ]]; then
orig_apk_file="com.lomoware.lomorage-v9(0.72)-release"
fi
### $3
os=$3
echo "os="$os
if [[ "$os" == "" ]]; then
echo "please input os"
exit 2
fi
echo $orig_apk_file
orig_apk_file_path=$orig_apk_path$orig_apk_file'.zip'
echo $orig_apk_file_path
cp $orig_apk_file_path ./
release_apk_file=$orig_apk_file$now'_'$os.zip
echo $release_apk_file
mv "./"$orig_apk_file".zip" "./"$release_apk_file
tag=$now
hub release delete $now
hub release create -a $release_apk_file -m "latest release $now" $now