Skip to content

Commit 4434435

Browse files
committed
fetch-upstream-resources: enforce _BRANCH vars to be set upfront
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 1f7d4ce commit 4434435

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

_scripts/fetch-upstream-resources.sh

+5-9
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
# Fetches upstream resources from docker/docker and docker/distribution
44
# before handing off the site to Jekyll to build
5-
# Relies on the following environment variables which are usually set by
6-
# the Dockerfile. Uncomment them here to override for debugging
5+
# Relies on the "ENGINE_BRANCH" and "DISTRIBUTION_BRANCH" environment variables,
6+
# which are usually set by the Dockerfile.
7+
: "${ENGINE_BRANCH?No release branch set for docker/docker and docker/cli}"
8+
: "${DISTRIBUTION_BRANCH?No release branch set for docker/distribution}"
79

8-
# Helper functino to deal with sed differences between osx and Linux
10+
# Helper function to deal with sed differences between osx and Linux
911
# See https://stackoverflow.com/a/38595160
1012
sedi () {
1113
sed --version >/dev/null 2>&1 && sed -i -- "$@" || sed -i "" "$@"
@@ -49,12 +51,6 @@ done < <(cat ./_config.yml |grep '_version:' |grep '^[a-z].*')
4951
# Replace variable in toc.yml with value from above
5052
sedi "s/{{ site.latest_engine_api_version }}/$latest_engine_api_version/g" ./_data/toc.yaml
5153

52-
# Engine stable
53-
ENGINE_BRANCH="19.03"
54-
55-
# Distribution
56-
DISTRIBUTION_BRANCH="release/2.7"
57-
5854
# Translate branches for use by svn
5955
engine_svn_branch="branches/${ENGINE_BRANCH}"
6056
if [ engine_svn_branch = "branches/master" ]; then

0 commit comments

Comments
 (0)