From f1626574ddcbad2ed1085a1bfe01bb52ad8c35ae Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Sat, 24 Jun 2017 23:26:25 +0300 Subject: [PATCH] fix(aio): build `scripts-js` before creating a new docker image for the preview server When creating a new docker image for the preview server, the TypeScript source code in `scripts-js/` is not copied over. Instead only the generated JavaScript core in `scripts-js/dist/` are. Because of that, it is necessary to have run `yarn build` before running `docker build`, so that the new docker image contains the latest changes in `scripts-js/`. This was previously part of the `create-image.sh` script, but was accidentally removed in 21d213dfc. --- aio/aio-builds-setup/scripts/create-image.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aio/aio-builds-setup/scripts/create-image.sh b/aio/aio-builds-setup/scripts/create-image.sh index 22e1b7765d..86c6905bcf 100755 --- a/aio/aio-builds-setup/scripts/create-image.sh +++ b/aio/aio-builds-setup/scripts/create-image.sh @@ -5,6 +5,14 @@ set -eux -o pipefail source "`dirname $0`/_env.sh" readonly defaultImageNameAndTag="aio-builds:latest" +# Build `scripts-js/` +# (Necessary, because only `scripts-js/dist/` is copied to the docker image.) +( + cd "$SCRIPTS_JS_DIR" + yarn install + yarn build +) + # Create docker image readonly nameAndOptionalTag=${1:-$defaultImageNameAndTag} sudo docker build --tag $nameAndOptionalTag ${@:2} $DOCKERBUILD_DIR