Skip to content

Build and Versioning

Dmitry Evseev edited this page Sep 1, 2017 · 12 revisions

Structure

The client side of the Application is merely a stub that redirects to the web app which holds most of the application's code. The entry point of the app is the file index.html inside www.

On the server side, the Cordova related files including the plugin code is hosted under public/s/phonegap. The plugin related files are versioned and stored in the cordova-plugins folder in this directory. The default folder in cordova-plugins has all plugins used and the test apk generated loads its plugins from this folder. Also, if a version number is not specified in index.html, plugins will be loaded from this folder by default.

The public/s/phonegap directory is a git submodule and this points to the scrollback/phoegap repository on Github. All of the plugin related code is version controlled.

Versioning

The Cordova project has to be versioned before each new apk is released on the appstore. Versioning ensures that older versions of the app are backward compatible with the server side Scrollback code. The app is versioned by providing the version number as part of the redirect URL inside index.html. For instance, the URL for version 1.1 would be:

https://local.scrollback.io/me?platform=cordova-android&app-version=1.1

The server would in turn parse the version and handle it appropriately by serving the required files. It is not requried to manually set the version number in index.html as this will be handled during the build process described below.

Build Process

Before doing the build ensure that scrollback.keystore which is the key for signing the app is present in the phonegap directory.

Staging App

To build the staging app, run release.sh:

./release.sh alpha <version>

The <verison> param represents the version number of the app to be generated.

The generated apk would be present under platforms/android/ant-build/app-release.apk.

Release App

To build the production app, run release.sh with the following syntax:

./release.sh beta <version>

If a new version of the app is being generated, the newly genrated files will have to be committed and pushed to the repo. The release apk will be present at ``` platforms/android/ant-build/app-release.apk

Once the apk is generated, the correctness of the redirect URL has to be ensured in the assets/www/index.html file present inside the apk.

Clone this wiki locally