From 047db942fd7abbfd4ca78fb74ff6d64acc3e2538 Mon Sep 17 00:00:00 2001 From: Nikhil Saraf <1028334+nikhilsaraf@users.noreply.github.com> Date: Tue, 26 Jan 2021 18:09:39 +0530 Subject: [PATCH] build script should return an error if amplitude key is missing for force releases --- scripts/build.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 7a6d8709b..8c7f12367 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -213,13 +213,9 @@ then then if [ -z "$AMPLITUDE_API_KEY" ] then - if [[ FORCE_RELEASE -eq 0 ]] - then - echo "error: define the AMPLITUDE_API_KEY environment variable before compiling" - exit 1 - else - echo "force release option set so ignoring missing AMPLITUDE_API_KEY" - fi + # we want this to throw even if doing a force release because the code checks for the key when in release mode + echo "error: define the AMPLITUDE_API_KEY environment variable before compiling" + exit 1 fi if ! [[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-rc[1-9]+)?$ ]] then