Created
June 24, 2015 06:25
-
-
Save easternHong/956ffcb7f72eb4f72917 to your computer and use it in GitHub Desktop.
ubuntu shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd /home/hunt/AndroidStudioProjects/EFamily/EFamily | |
| branch='' | |
| printf "please input branch :" | |
| read branch | |
| git co ${branch} | |
| #echo ${branch} | |
| time=`date +"%02m%d%H"` | |
| build=`date +"%m%d%H"` | |
| versionCode="$time" | |
| echo ${versionCode} | |
| versionName="${branch}.${build}" | |
| echo ${versionName} | |
| #clean | |
| gradle clean | |
| # get build command | |
| BUILD_CMD="gradle assemble\ | |
| -PversionCode=${versionCode} \ | |
| -PversionName=${versionName} \ | |
| -x lint" | |
| #run gradle build .... | |
| $BUILD_CMD | |
| cp app/build/outputs/apk/app-release-unsigned.apk cert/app-release-unsigned.apk | |
| echo generating-- | |
| cd cert/ | |
| java -jar signapk.jar platform.x509.pem platform.pk8 app-release-unsigned.apk app-signed.apk | |
| echo "uninstall com.cylan.efamily" | |
| adb uninstall com.cylan.efamily | |
| echo "install -r app-signed.apk" | |
| adb install -r app-signed.apk | |
| echo "start EFamily" | |
| adb shell am start com.cylan.efamily/.ui.activities.main.EFamilyActivity | |
| echo "finised clean" | |
| rm -fr *.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment