diff --git a/build-fakeyou.sh b/build-fakeyou.sh index b38eb27d6d..01e56236b9 100755 --- a/build-fakeyou.sh +++ b/build-fakeyou.sh @@ -4,6 +4,8 @@ set -euxo pipefail # Add the GIT SHA to the build +# This must be done before everything else, or it will get cached with the build. +# (This might be making the builds less performant?) # COMMIT_REF is defined by Netlify to be the commit SHA # We want a short 8 character reference. echo "Labelling build with short SHA..." diff --git a/build-storyteller-home.sh b/build-storyteller-home.sh index a9e7eb747d..d532758a47 100755 --- a/build-storyteller-home.sh +++ b/build-storyteller-home.sh @@ -3,13 +3,9 @@ set -euxo pipefail -# --ignore-engines: https://stackoverflow.com/a/59615348 -yarn build-storyteller-home --verbose --ignore-optional --ignore-engines - -mkdir storyteller-home -mv packages/storyteller-home/build/ storyteller-home/build/ - # Add the GIT SHA to the build +# This must be done before everything else, or it will get cached with the build. +# (This might be making the builds less performant?) # COMMIT_REF is defined by Netlify to be the commit SHA # We want a short 8 character reference. echo "Labelling build with short SHA..." @@ -18,6 +14,12 @@ find . -type f -exec sed -i "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} + # The above command won't work with Mac's version of find/sed. The following is a Mac-friendly version: # find . -type f -exec sed -i '' -e "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} + +# --ignore-engines: https://stackoverflow.com/a/59615348 +yarn build-storyteller-home --verbose --ignore-optional --ignore-engines + +mkdir storyteller-home +mv packages/storyteller-home/build/ storyteller-home/build/ + echo "Copying redirects configuration to Netlify build dir..." cp _redirects storyteller-home/build/ diff --git a/build-storyteller-obs.sh b/build-storyteller-obs.sh index 83caee9d47..cb5ff7d95f 100755 --- a/build-storyteller-obs.sh +++ b/build-storyteller-obs.sh @@ -3,13 +3,9 @@ set -euxo pipefail -# --ignore-engines: https://stackoverflow.com/a/59615348 -yarn build-storyteller-obs --verbose --ignore-optional --ignore-engines - -mkdir storyteller-obs -mv packages/storyteller-obs/build/ storyteller-obs/build/ - # Add the GIT SHA to the build +# This must be done before everything else, or it will get cached with the build. +# (This might be making the builds less performant?) # COMMIT_REF is defined by Netlify to be the commit SHA # We want a short 8 character reference. echo "Labelling build with short SHA..." @@ -18,6 +14,12 @@ find . -type f -exec sed -i "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} + # The above command won't work with Mac's version of find/sed. The following is a Mac-friendly version: # find . -type f -exec sed -i '' -e "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} + +# --ignore-engines: https://stackoverflow.com/a/59615348 +yarn build-storyteller-obs --verbose --ignore-optional --ignore-engines + +mkdir storyteller-obs +mv packages/storyteller-obs/build/ storyteller-obs/build/ + echo "Copying redirects configuration to Netlify build dir..." cp _redirects storyteller-obs/build/ diff --git a/build-storyteller-stream.sh b/build-storyteller-stream.sh index c917d74e48..b0b24cb6a0 100755 --- a/build-storyteller-stream.sh +++ b/build-storyteller-stream.sh @@ -3,13 +3,9 @@ set -euxo pipefail -# --ignore-engines: https://stackoverflow.com/a/59615348 -yarn build-storyteller-stream --verbose --ignore-optional --ignore-engines - -mkdir storyteller-stream -mv packages/storyteller-stream/build/ storyteller-stream/build/ - # Add the GIT SHA to the build +# This must be done before everything else, or it will get cached with the build. +# (This might be making the builds less performant?) # COMMIT_REF is defined by Netlify to be the commit SHA # We want a short 8 character reference. echo "Labelling build with short SHA..." @@ -18,6 +14,12 @@ find . -type f -exec sed -i "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} + # The above command won't work with Mac's version of find/sed. The following is a Mac-friendly version: # find . -type f -exec sed -i '' -e "s/CURRENT_STORYTELLER_VERSION/${SHORT_SHA}/g" {} + +# --ignore-engines: https://stackoverflow.com/a/59615348 +yarn build-storyteller-stream --verbose --ignore-optional --ignore-engines + +mkdir storyteller-stream +mv packages/storyteller-stream/build/ storyteller-stream/build/ + echo "Copying redirects configuration to Netlify build dir..." cp _redirects storyteller-stream/build/