From 158f9b4938ec5d11824371475a500c25209ffed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 17 Jul 2019 07:41:18 -0400 Subject: [PATCH] fix release builds by renaming .env.prod to .env.release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .env.nightly.staging.fleet | 20 -------------------- .env.prod => .env.release | 0 ci/utils.groovy | 11 ++++------- fastlane/Fastfile | 8 ++++---- 4 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 .env.nightly.staging.fleet rename .env.prod => .env.release (100%) diff --git a/.env.nightly.staging.fleet b/.env.nightly.staging.fleet deleted file mode 100644 index cbcb9abfc2..0000000000 --- a/.env.nightly.staging.fleet +++ /dev/null @@ -1,20 +0,0 @@ -DEBUG_WEBVIEW=1 -DEFAULT_NETWORK=mainnet_rpc -ERC20_CONTRACT_WARNINGS=1 -ETHEREUM_DEV_CLUSTER=1 -EXTENSIONS=1 -FLEET=eth.staging -GROUP_CHATS_ENABLED=1 -LOG_LEVEL_STATUS_GO=info -LOG_LEVEL=debug -MAILSERVER_CONFIRMATIONS_ENABLED=1 -MAINNET_WARNING_ENABLED=1 -PFS_ENCRYPTION_ENABLED=1 -PFS_TOGGLE_VISIBLE=1 -POW_TARGET=0.002 -POW_TIME=1 -SNOOPY=0 -STICKERS_ENABLED=0 -PARTITIONED_TOPIC=0 -CONTRACT_NODES=1 -MOBILE_UI_FOR_DESKTOP=0 diff --git a/.env.prod b/.env.release similarity index 100% rename from .env.prod rename to .env.release diff --git a/ci/utils.groovy b/ci/utils.groovy index abc91c02f0..b43e1b7cb9 100644 --- a/ci/utils.groovy +++ b/ci/utils.groovy @@ -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() diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 4ea83a0a1c..6037f4ec02 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -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" @@ -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" @@ -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" @@ -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"