Created
November 26, 2018 16:17
-
-
Save virtualprodigy/c8a25f47a34122e5a0430972e3503de9 to your computer and use it in GitHub Desktop.
A simple shell script that you can use to create two AppCenter.ms CodePush projects. One for Android and one for iOS
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
#A script from VirtualProdigy that creates codepush applications for Android and iOS | |
#remember to give the script run permissions by running $chmod u+x <path to script> | |
# you can also run $appcenter profile list | |
# use the username as the ownername | |
echo "Fetching login details...enter the username for the ownername" | |
appcenter profile list | |
#set owner name. See offical docs https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cordova#api-reference | |
echo "Enter the ownername, followed by [ENTER]:" | |
read OWNER_NAME | |
#set application display name (will append andriod and ios to name when creating projects) | |
echo "Enter a display name for your application, followed by [ENTER]:" | |
echo "An Android and iOS project will be created. [<app-name>-ios , <app-name>-android]" | |
read APPLICATION_NAME | |
#Set project type, ie Cordova | |
echo "Enter the project type for your applications, followed by [ENTER]:" | |
read APPLICATION_TYPE | |
#Create platform applications | |
appcenter apps create -d $APPLICATION_NAME'-android' -p $APPLICATION_TYPE -o Android | |
appcenter apps create -d $APPLICATION_NAME'-ios' -p $APPLICATION_TYPE -o iOS | |
#Creating deployment stages | |
#iOS | |
appcenter codepush deployment add -a $OWNER_NAME/$APPLICATION_NAME-ios Staging | |
appcenter codepush deployment add -a $OWNER_NAME/$APPLICATION_NAME-ios Production | |
#Android | |
appcenter codepush deployment add -a $OWNER_NAME/$APPLICATION_NAME-android Staging | |
appcenter codepush deployment add -a $OWNER_NAME/$APPLICATION_NAME-android Production | |
#Display Deployment Keys | |
#iOS | |
echo "iOS Deployment Keys" | |
appcenter codepush deployment list --app $OWNER_NAME/$APPLICATION_NAME-ios | |
#Android | |
echo "Android Deployment Keys" | |
appcenter codepush deployment list --app $OWNER_NAME/$APPLICATION_NAME-android | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment