Last active
October 9, 2017 01:20
-
-
Save rikyperdana/308b98021accb6b7b625ce4cefcbe9c4 to your computer and use it in GitHub Desktop.
Shell Script for building Meteor Android
This file contains 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
# Prepare android-sdk-linux-cli with https://gist.github.com/rikyperdana/61b1a5008b757da35a745185bfed7374 | |
# Update your android sdk to the latest on android-sdk-linux/tools with | |
# android list sdk --all | |
# android update sdk -u -a -t <package num> | |
# Copy this meteorandroid.sh to your project folder, and then chmod +x meteorandroid.sh | |
# We will use 2 params, app_name and server_address | |
# Example, meteorandroid.sh sample http://localhost:3000 | |
meteor add-platform android | |
meteor build ../apk_$1 --server=$2 | |
mkdir ../apk_$1 ../apk_$1/android | |
cd ../apk_$1/android | |
keytool -genkey -alias $1 -keyalg RSA -keysize 2048 -validity 10000 | |
# You will fill some information like names and bla bla | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 release-unsigned.apk $1 | |
~/android-sdk-linux/build-tools/*/zipalign 4 release-unsigned.apk $1.apk | |
# Then you will get your signed app_name.apk | |
# Always backup your ~/.keystore file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment