From 7feb000bb37a6f5d67ce9e30541daf4ada8a9510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 29 Aug 2017 00:41:24 +0200 Subject: [PATCH] Support deploying extra files using an EXTRA_FILES variable --- resources.whatwg.org/build/deploy.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/resources.whatwg.org/build/deploy.sh b/resources.whatwg.org/build/deploy.sh index 007f0029c..47d1717f0 100644 --- a/resources.whatwg.org/build/deploy.sh +++ b/resources.whatwg.org/build/deploy.sh @@ -63,6 +63,12 @@ echo "" rm -rf "$WEB_ROOT" || exit 0 +copy_extra_files() { + if [[ "$EXTRA_FILES" != "" ]]; then + cp $EXTRA_FILES $1 + fi +} + if [[ $BRANCH != "master" ]] ; then # Branch snapshot, if not master BRANCH_DIR="$WEB_ROOT/$BRANCHES_DIR/$BRANCH" @@ -72,7 +78,8 @@ if [[ $BRANCH != "master" ]] ; then -F md-title="$TITLE (Branch Snapshot $BRANCH)" \ -F md-Text-Macro="SNAPSHOT-LINK $BACK_TO_LS_LINK" \ > "$BRANCH_DIR/index.html"; - echo "Branch snapshot output to $WEB_ROOT/$BRANCHES_DIR/$BRANCH" + copy_extra_files "$BRANCH_DIR" + echo "Branch snapshot output to $BRANCH_DIR" else # Commit snapshot, if master COMMIT_DIR="$WEB_ROOT/$COMMITS_DIR/$SHA" @@ -82,13 +89,15 @@ else -F md-title="$TITLE (Commit Snapshot $SHA)" \ -F md-Text-Macro="SNAPSHOT-LINK $BACK_TO_LS_LINK" \ > "$COMMIT_DIR/index.html"; - echo "Commit snapshot output to $WEB_ROOT/$COMMITS_DIR/$SHA" + copy_extra_files "$COMMIT_DIR" + echo "Commit snapshot output to $COMMIT_DIR" echo "" # Living standard, if master curl https://api.csswg.org/bikeshed/ -f -F file=@"$INPUT_FILE" \ -F md-Text-Macro="SNAPSHOT-LINK $SNAPSHOT_LINK" \ > "$WEB_ROOT/index.html" + copy_extra_files "$WEB_ROOT" echo "\"use strict\"; importScripts(\"https://resources.whatwg.org/standard-service-worker.js\");