Developers may use this document as a tutorial for deploying PVTrAck updates to its various distribution channels.
Play Store and App Store sections loosely follow the Ionic documentation for publishing. Many of the steps described there have already been done for you.
- Determine a version number for your release. For example, 1.1.3. See Google Play section for more details.
- Create a tag for the release using the version from above. ex:
git tag 1.1.3 && git push --tags
Prerequirements
- You must have SSH access to
af-transit-app3.admin.umass.edu
. See @werebus.
From your local clone, execute the following commands:
bundle install
- installs Capistrano, a Ruby tool for deployment automation.cap production deploy
- connects to app3 and updatesm.pvta.com
to contain the version of PVTrAck currently onorigin/master
.
Prerequirements
- You must have the official PVTrAck signing key. See @akaplo.
- You should have Android Studio installed.
- You must have the Android SDK and Android build tools installed (both bundled with Android Studio, see above). We target API level 25 (Nougat, 7.1).
- You must have access to the Google Play Developer Console (see @sherson with your Google username, who will contact @jpbagley26).
From your local clone, execute the following commands:
npm install
andbower install
- Open
config.xml
. On line 2, incrementandroid-versionCode
, which is (currently) a 4 digit integer, as follows:
-
Round up to the nearest thousand for a major release (i.e. 1010 -> 2000, or in Semantic Versioning terms, this would be represented as 1.0.1 -> 2.0.0).
-
Round up to the nearest 100 for a minor release that may include bugfixes and features, but nothing crazy (i.e. 1120 -> 1200 or in Semantic Versioning terms, this would be represented as 1.1.2 -> 1.2.0).
-
Round up to the nearest 10 for a release that ONLY includes bugfixes, large or small (i.e. 1120 -> 1130 or in Semantic Versioning terms, this would be represented as 1.1.2 -> 1.1.3).
-
INCREMENT by one for a miniscule bugfix release. In Semantic Versioning terms, a change this small would not warrant a new version number. Use at your own discretion.
-
On the same line in
config.xml
, updateversion
to match your work in step 2, translated into Semantic Versioning. -
ionic prepare android --release
Troubleshooting: if you get an error related to whether this repo is an Android project, do the following:
ionic platform rm android
ionic platform add [email protected]
<-- a/o 12/30/16, Cordova isn't giving you 6.1.0 by default, which fixes a nasty bug related to image assets. Remove the specific version at your own discretion.
Steps 5-10 can be done in terminal and easily automated. See Ionic's docs
-
Open the project in Android Studio, where the Android project root is at /platforms/android/.
-
In Android Studio, select Build -> Generate Signed APK. An appropriately titled dialog box should appear.
-
Select Next to choose the module we wish to build the APK against. We have only one, called
android
. -
Browse for your keystore that contains the official PVTrAck signing key. Enter the password for the store itself, the key alias, and key password. Enter your master password if prompted.
-
Specify a destination folder for the APK (default is OK). Leave the build type set to RELEASE unless you want a debug build for a test device. Select Finish.
-
Navigate to where your new APK is.
-
In the Google Play Developer Console, navigate to the APK subpage from the sidemenu. Select
Upload new APK to production
. If you wish to beta test your build, first select theBest Test
tab. In the popup, drag/drop the APK. Write a quick blurb about what changed, and click Submit Update. -
Rejoice.
Forthcoming.