Skip to content

Commit

Permalink
fix release builds by renaming .env.prod to .env.release
Browse files Browse the repository at this point in the history
This way the nix expression in nix/mobile/android/targets/release-android.nix will not fail.
And the naming of build types and `.env.${type}` files will be more consistent.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Jul 17, 2019
1 parent 8afd9c6 commit 158f9b4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 31 deletions.
20 changes: 0 additions & 20 deletions .env.nightly.staging.fleet

This file was deleted.

File renamed without changes.
11 changes: 4 additions & 7 deletions ci/utils.groovy
Expand Up @@ -168,15 +168,12 @@ def changeId() {
}

def updateEnv(type) {
def envFile = "${env.WORKSPACE}/.env"
def envFile = "${env.WORKSPACE}/.env.jenkins"
/* select .env based on type of build */
def selectedEnv = '.env.jenkins'
switch (type) {
case 'nightly': selectedEnv = '.env.nightly'; break
case 'release': selectedEnv = '.env.prod'; break
case 'e2e': selectedEnv = '.env.e2e'; break
if (['nightly', 'release', 'e2e'].contains(type)) {
envFile = "${env.WORKSPACE}/.env.${type}"
}
sh "cp ${selectedEnv} .env"
sh "ln -sf ${envFile} .env"
/* find a list of .env settings to check for them in params */
def envContents = readFile(envFile)
def envLines = envContents.split()
Expand Down
8 changes: 4 additions & 4 deletions fastlane/Fastfile
Expand Up @@ -256,7 +256,7 @@ platform :ios do

desc "`fastlane ios saucelabs` - upload .app to sauce labs"
desc "also notifies in a GitHub comments"
desc "expects to have an .apk prepared: `android/app/build/outputs/apk/release/app-release.apk`"
desc "expects to have an .apk prepared: `android/result/app.apk`"
desc "expects to have a saucelabs access key as SAUCE_ACCESS_KEY env variable"
desc "expects to have a saucelabs username token as SAUCE_USERNAME env variable"
desc "expects to have a saucelabs destination name as SAUCE_LABS_NAME env variable"
Expand All @@ -276,7 +276,7 @@ end

platform :android do
# Optional env variables
APK_PATH = ENV["APK_PATH"] || "android/app/build/outputs/apk/release/app-release.apk"
APK_PATH = ENV["APK_PATH"] || "android/result/app.apk"

desc "Deploy a new internal build to Google Play"
desc "expects GOOGLE_PLAY_JSON_KEY environment variable"
Expand Down Expand Up @@ -311,7 +311,7 @@ platform :android do
end

desc "`fastlane android upload_diawi` - upload .apk to diawi"
desc "expects to have an .apk prepared: `android/app/build/outputs/apk/release/app-release.apk`"
desc "expects to have an .apk prepared: `android/result/app.apk`"
desc "expects to have a diawi token as DIAWI_TOKEN env variable"
desc "expects to have a github token as GITHUB_TOKEN env variable"
desc "will fails if file isn't there"
Expand All @@ -322,7 +322,7 @@ platform :android do
end

desc "`fastlane android saucelabs` - upload .apk to sauce labs"
desc "expects to have an .apk prepared: `android/app/build/outputs/apk/release/app-release.apk`"
desc "expects to have an .apk prepared: `android/result/app.apk`"
desc "expects to have a saucelabs access key as SAUCE_ACCESS_KEY env variable"
desc "expects to have a saucelabs username token as SAUCE_USERNAME env variable"
desc "expects to have a saucelabs destination name as SAUCE_LABS_NAME env variable"
Expand Down

0 comments on commit 158f9b4

Please sign in to comment.