Skip to content

Commit

Permalink
Sign with debug key, encrypted for Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
comp500 committed Jun 4, 2019
1 parent bcf5bc1 commit 8ad38ca
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ language: android
dist: trusty
android:
components:
- build-tools-28.0.3
- android-27
- build-tools-28.0.3
- android-27
before_script:
- sudo apt-get install unzip -y
- wget https://www.stunnel.org/downloads/stunnel-5.54-android.zip -O /tmp/stunnel.zip
- unzip /tmp/stunnel.zip stunnel-*-android/stunnel
- mkdir -p app/src/main/assets/
- cp stunnel-*-android/stunnel app/src/main/assets/
- sudo apt-get install unzip -y
- wget https://www.stunnel.org/downloads/stunnel-5.54-android.zip -O /tmp/stunnel.zip
- unzip /tmp/stunnel.zip stunnel-*-android/stunnel
- mkdir -p app/src/main/assets/
- cp stunnel-*-android/stunnel app/src/main/assets/
script:
- ./gradlew build assembleDebug
- "./gradlew build assembleDebug"
deploy:
provider: releases
api_key:
Expand All @@ -22,3 +22,6 @@ deploy:
on:
repo: comp500/SSLSocks
tags: true
before_install:
- openssl aes-256-cbc -K $encrypted_97db662e41ec_key -iv $encrypted_97db662e41ec_iv
-in debug.keystore.enc -out debug.keystore -d
14 changes: 12 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "link.infra.sslsocks"
minSdkVersion 19
targetSdkVersion 27
versionCode 10
versionName "0.0.10-beta"
versionCode 11
versionName "0.0.11-beta"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand All @@ -18,6 +18,16 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

def isRunningOnTravis = System.getenv("CI") == "true"

if (isRunningOnTravis) {
// configure keystore
signingConfigs.release.storeFile = file("../debug.keystore")
signingConfigs.release.storePassword = System.getenv("keystore_password")
signingConfigs.release.keyAlias = System.getenv("keystore_alias")
signingConfigs.release.keyPassword = System.getenv("keystore_alias_password")
}
}

dependencies {
Expand Down
Binary file added debug.keystore.enc
Binary file not shown.

0 comments on commit 8ad38ca

Please sign in to comment.