Last active
October 20, 2017 12:18
-
-
Save guptasanchit90/22c3d83c81ff2ac4e517890cf5b01ef1 to your computer and use it in GitHub Desktop.
A basic script to make Ionic release for android process simpler
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
#!/bin/bash | |
## Static properties | |
PROPERTIES_PATH="platforms/android/release-signing.properties" | |
## Navigate to main project folder | |
echo "Enter path to ionic project root folder : " | |
read PROJECT_PATH | |
cd $PROJECT_PATH | |
## Read keystore properties and save | |
if [ -e $PROPERTIES_PATH ] | |
then | |
echo "Already got keystore details" | |
else | |
echo "Keystore details not found" | |
echo "Enter keystore Path with extension : " | |
read keystore_path | |
echo "Enter keystore password : " | |
read -s keystore_pass | |
echo "Enter keystore alias : " | |
read keystore_alias | |
echo "Enter alias password : " | |
read -s keystore_alias_pass | |
echo " | |
key.store=$keystore_path | |
key.store.password=$keystore_pass | |
key.alias=$keystore_alias | |
key.alias.password=$keystore_alias_pass" > $PROPERTIES_PATH | |
fi | |
## Actual build process | |
echo "Starting build process" | |
ionic cordova build android --prod --release | |
## Removing keystore info | |
echo "Remove keystore information [Y/N]" | |
read shouldRemoveKeyStoreInformation | |
if [ "$shouldRemoveKeyStoreInformation" == "Y" ] || [ "$shouldRemoveKeyStoreInformation" == "y" ] | |
then | |
rm $PROPERTIES_PATH | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment