Skip to content

Commit

Permalink
Android deploy (#34)
Browse files Browse the repository at this point in the history
Deploys master branch to HockeyApp Alpha lane
  • Loading branch information
markholland authored Feb 18, 2018
1 parent ad2cf23 commit 0d61bf9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 9 deletions.
19 changes: 18 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,25 @@ jobs:
path: ~/project
- attach_workspace:
at: ~/project
- run: git clone git@github.com:redbadger/pride-android-secrets.git
- run: mkdir -p .gradle
- run: echo -e "keystore=$ANDROID_KEYSTORE_PATH\nkeystore.alias=$ANDROID_KEYSTORE_ALIAS\nkeystore.password=$ANDROID_KEYSTORE_PASSWORD\nkeystore.keypass=$ANDROID_KEYSTORE_PASSWORD" >> .gradle/gradle.properties
- run: bundle install
- run: bundle exec fastlane build
# Only deploy build from master branch
- run:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
GIT_COMMIT_DESC=`git log --format=%B -n 1 $CIRCLE_SHA1`
curl \
-F "status=2" \
-F "notify=1" \
-F "notes=$GIT_COMMIT_DESC" \
-F "commit_sha=$CIRCLE_SHA1"
-F "ipa=@./app/build/outputs/apk/app-release.apk" \
-H "X-HockeyAppToken: $HOCKEY_APP_TOKEN" \
https://rink.hockeyapp.net/api/2/apps/$HOCKEY_APP_ANDROID_APP_ID/app_versions/upload
fi
- store_artifacts:
path: ~/project/android/app/build/outputs

Expand Down Expand Up @@ -124,4 +141,4 @@ workflows:
filters:
branches:
only:
- master
- master
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ yarn-error.log
buck-out/
\.buckd/
*.keystore
*.jks

# fastlane
#
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

<!-- toc -->

* [Running](#running)
- [Running](#running)
* [Prerequisites](#prerequisites)
* [Environment Variables](#environment-variables)
* [Running](#running-1)
* [iOS](#ios)
* [Android](#android)
+ [iOS](#ios)
+ [Android](#android)
* [Debugging](#debugging)
* [Generating test data](#generating-test-data)
* [Contributing](#contributing)
- [Generating test data](#generating-test-data)
- [Contributing](#contributing)
* [Architecture Decision Records](#architecture-decision-records)
* [Links](#links)
- [Links](#links)

<!-- tocstop -->

Expand Down Expand Up @@ -82,7 +82,7 @@ node ./scripts/generate-content.js delete -s <space_id> -a <access_token>
Pieces of work currently up for grabs will be listed on the [issues page](https://github.com/redbadger/pride-london-app/issues) and tracked on the [projects page](https://github.com/redbadger/pride-london-app/projects). If you are able to work on the piece of work, comment on the issue. You can also discuss the feature in the isssue page. Be honest about if you have the time to work on it, there's no shame in parking a piece of work and letting someone else pick it up if you're too busy.

All Pull Requests are built by [CircleCI](https://circleci.com/gh/redbadger/workflows/pride-london-app)
Merging a Pull Request to the master branch will trigger a build number increase and deploy to TestFight for iOS device testing.
Merging a Pull Request to the master branch will trigger a build number increase followed by a deploy to TestFight for iOS devices and to HockeyApp for Android devices.

Submit your Pull Request from a repo fork and one of the core dev team will review and merge it.

Expand Down
11 changes: 11 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,21 @@ android {
include "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
Properties props = new Properties()
props.load(new FileInputStream(file("../.gradle/gradle.properties")))
storeFile file(props['keystore'])
storePassword props['keystore.password']
keyAlias props['keystore.alias']
keyPassword props['keystore.keypass']
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down

0 comments on commit 0d61bf9

Please sign in to comment.