Skip to content

Commit

Permalink
signing release on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesa2 committed Feb 9, 2019
1 parent 984104d commit a6d8e4a
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ install:
# - emulator -avd test -no-skin -no-audio -no-window &
# - chmod +x ./wait_for_emulator.sh
# - ./wait_for_emulator.sh

before_script:
- ./signing/decrypt.sh

script:
# force init of adb way before any Gradle task that uses ADB; prevents a timeout error that skips emulators of android-24
- adb devices
Expand All @@ -44,6 +48,9 @@ env:
matrix:
- ANDROID_TARGET=android-28 ANDROID_ABI=armeabi-v7a

after_script:
- ./signing/cleanup.sh

deploy:
provider: releases
api_key: ${api_key}
Expand Down
24 changes: 19 additions & 5 deletions owncloudApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,36 @@ android {
}

signingConfigs {
release {
if (System.env.OC_RELEASE_KEYSTORE) {
if (System.env.OC_RELEASE_KEYSTORE) {
release {
println "I run with OC_RELEASE_KEYSTORE"
storeFile file(System.env.OC_RELEASE_KEYSTORE) // use an absolute path
storePassword System.env.OC_RELEASE_KEYSTORE_PASSWORD
keyAlias System.env.OC_RELEASE_KEY_ALIAS
keyPassword System.env.OC_RELEASE_KEY_PASSWORD
}
} else if (System.getenv("TRAVIS")) {
release {
println "I run on TRAVIS"
storeFile file('../signing/release.keystore')
storePassword System.getenv("KEYSTORE_PASS")
keyAlias System.getenv("ALIAS_NAME")
keyPassword System.getenv("ALIAS_PASS")
}
} else {
release {
println "I run local"
storePassword "android"
keyPassword "android"
keyAlias "androiddebugkey"
}
}
}

buildTypes {

release {
if (System.env.OC_RELEASE_KEYSTORE) {
signingConfig signingConfigs.release
}
signingConfig signingConfigs.release
}

debug {
Expand Down
52 changes: 52 additions & 0 deletions signing/GooglePlay.p12.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 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h1VVoAyupLooWXkAAxxlIq/9gmor2hR
+fgOpZ7ZOmWo00yCDIbgI10HBaiSar6JAf7FV9R31MgYnDo4wq1+x0t9dttq3YLo
IGDgwKbyGedIW/P8+bSrPTD9qx7TAflAJ5WuZZLlpyXsm298QgUASb/RiiXQsc8P
4 changes: 4 additions & 0 deletions signing/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

find . -name '*.p12' |xargs rm
find . -name '*.keystore' |xargs rm
24 changes: 24 additions & 0 deletions signing/decrypt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

pwd

if [ -z "$CRYPT_PASS" ]
then
echo "\$CRYPT_PASS is empty"
exit 1
else
echo "\$CRYPT_PASS available"
fi

cd signing

# to encrypt
#openssl aes-256-cbc -a -salt -k "CRYPT_PASS" -in GooglePlay.p12 -out GooglePlay.p12.enc
#openssl aes-256-cbc -a -salt -k "CRYPT_PASS" -in release.keystore -out release.keystore.enc

# Ubuntu 18.04 (openssl 1.1.0g+) needs -md md5
# https://askubuntu.com/questions/1067762/unable-to-decrypt-text-files-with-openssl-on-ubuntu-18-04/1076708
openssl aes-256-cbc -a -d -md md5 -k "$CRYPT_PASS" -in GooglePlay.p12.enc -out GooglePlay.p12
openssl aes-256-cbc -a -d -md md5 -k "$CRYPT_PASS" -in release.keystore.enc -out release.keystore

cd ..
48 changes: 48 additions & 0 deletions signing/release.keystore.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
U2FsdGVkX19m4xKlexyJ628fHsOMqPPEyTqUzYmYG1ORUhA/Tu4a07bHlaaGW4Ve
DhddCllbQFN6o3Zc1VhrNrPQB9FJg/aTBbsPEBK++uxveqDWKESlPei9eN5FCtQ+
spWYG1Gy0lVjTnHCdlnImleUy+5wElS/+2Q/jAMg3I+H/Rb2SSVW9B/k28nQUtxs
4OZqt7CubNOw6yo4kbhNk87wgPS3ZcbRb6YHWwruKtXN4JaH73LvsMaYZT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