From e04f59b5dec86d8bdbc775670302be73e82e59bf Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 25 Apr 2024 21:50:29 -0400 Subject: [PATCH] bake env configs in build (#246) --- build-ci.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build-ci.sh b/build-ci.sh index fd39fb8cc1..472d59a62b 100755 --- a/build-ci.sh +++ b/build-ci.sh @@ -12,8 +12,17 @@ set -euxo pipefail echo "Labelling build with short SHA..." SHORT_SHA=$(echo "${COMMIT_REF}" | cut -c1-8) +echo "Baking current git SHA to code"; + find . -type f -exec sed -i "s/CURRENT_STORYTELLER_GIT_VERSION/${SHORT_SHA}/g" {} + +echo "Baking ENV configs to code"; + +find . -type f -exec sed -i "s/%BUILD_BASE_API%/${BASE_API}/g" {} + +find . -type f -exec sed -i "s/%BUILD_GOOGLE_API%/${GOOGLE_API}/g" {} + +find . -type f -exec sed -i "s/%BUILD_FUNNEL_API%/${FUNNEL_API}/g" {} + +find . -type f -exec sed -i "s/%BUILD_CDN_API%/${CDN_API}/g" {} + + # TODO: Run tests when we add them. # Run build.