Skip to content

Commit

Permalink
deploy.sh: make EXTRA_FILES preserve directory structure
Browse files Browse the repository at this point in the history
... with the magic of rsync.

Will be used for whatwg/console#118.
  • Loading branch information
foolip committed Sep 4, 2017
1 parent dbbbbc6 commit 99589a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources.whatwg.org/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For non-local deploys, it is dependent on the following environment setup:
Optional environment variables:
- `$SERVER` is the server to deploy to.
- `$SERVER_PUBLIC_KEY` is the public key of the deploy server, in the format of `known_hosts`.
- `$EXTRA_FILES` are extra files to copy for each build. Shell wildcards are allowed. Example: `EXTRA_FILES="*.png"`.
- `$EXTRA_FILES` are extra files to copy for each build. Shell wildcards are allowed, and directory structure will be preserved. Example: `EXTRA_FILES="images/*.png"`.
- `$POST_BUILD_STEP` is an extra step to run after each build. Evaluated with the `$DIR` variable set to the build directory. Example: `POST_BUILD_STEP='python generate-stuff.py "$DIR"'`.

An example `.travis.yml` file that uses this script would then be as follows:
Expand Down
2 changes: 1 addition & 1 deletion resources.whatwg.org/build/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ copy_extra_files() {
echo "Copying extra files ($EXTRA_FILES) to $1"
# Will not pass shellcheck: https://stackoverflow.com/q/45931553/3191
# shellcheck disable=SC2086
cp $EXTRA_FILES "$1"
rsync --relative $EXTRA_FILES "$1"
fi
}

Expand Down

0 comments on commit 99589a8

Please sign in to comment.