Merge pull request #18 from storytold/echelon-no-cache-all-build-shas

This seems to be the correct way to not cache the build SHA
This commit is contained in:
Brandon Thomas authored and GitHub committed 2022-06-20 23:17:03 -04:00
commit bc2ef0cfc9
4 files changed
+26 -18

No files matched your search

+2
View File
@@ -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..."
+8 -6
View File
@@ -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/
+8 -6
View File
@@ -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/
+8 -6
View File
@@ -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/