-
Notifications
You must be signed in to change notification settings - Fork 555
/
Copy pathdeploy.sh
executable file
·37 lines (31 loc) · 981 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
#!/bin/bash --login
apkPath=./app/build/outputs/apk
apkDebugFile=${apkPath}/app-debug.apk
apkReleaseFile=${apkPath}/app-release.apk
propertiesFile=./app/packer.properties
function pkgDebug(){
echo "package debug internal start"
./gradlew clean assembleDebug
. ${propertiesFile};
apkNew="debug-${version}.apk";
mv ${apkDebugFile} ${apkNew};
cp ${apkNew} /Users/tiansj/
# scp ${apkNew} [email protected]:/var/download/mobile/phone/android
echo "package debug internal success"
rm -rf ./${apkNew}
}
function pkgRelease(){
echo "package release outer start"
./gradlew clean assembleRelease
. ${propertiesFile};
apkNew="release-${version}.apk";
mv ${apkReleaseFile} ${apkNew};
cp ${apkNew} /Users/tiansj/
# scp ${apkNew} [email protected]:/var/download/mobile/phone/android
echo "package release outer success"
rm -rf ./${apkNew}
}
echo "Build start.........."
pkgDebug;
pkgRelease;
echo "Build end"