Skip to content

Commit

Permalink
Document Android production builds and add a helper script
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelLH committed Sep 16, 2018
1 parent 97f440c commit 1c3bd87
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ANDROID_KEYSTORE_PATH=../path/to/your.keystore
ANDROID_ZIPALIGN_PATH=../path/to/zipalign/binary
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore

# Don't check in individual build config settings
.env

# Don't check in production Android builds
PasswordMaker.apk

*~
*.sw[mnpcod]
*.log
Expand Down
14 changes: 14 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ A modern mobile app supporting [Password Maker](https://passwordmaker.org/).

Built with [Ionic](https://ionicframework.com/) and [Angular](https://angular.io/).

## Run locally

* `ionic serve`
* Note that the clipboard feature is currently not available in browser.

## Build

### Android

* Configure your local `.env` - copy from `.env.example` if missing.
* Run: `./build-helpers/android.sh`
* Enter signing key's password if prompted.
* Signed `PasswordMaker.apk` is created in the project root.

## Icon & splash screen

These use [Ionicons](https://ionicons.com/)' iOS-style key SVG (MIT licensed).
8 changes: 8 additions & 0 deletions build-helpers/android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Load configs
. .env

ionic cordova build android --prod --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $ANDROID_KEYSTORE_PATH platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk webful
$ANDROID_ZIPALIGN_PATH -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk PasswordMaker.apk

0 comments on commit 1c3bd87

Please sign in to comment.