diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2022-12-06 12:56:13 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2022-12-06 12:56:13 +0300 |
commit | 39bcf3618e29192a509824d48d5fb404c38bd2d2 (patch) | |
tree | 4fdb2eaea01da4e9aa6a881b9fcbb4d182e78430 | |
parent | 9119bcd5ea37bcee07984fb77de1451f67a66456 (diff) | |
parent | 2d2053e0ae729863b8c4e46a1d1393ba0dab8da2 (diff) |
Merge branch 'sarahg/minify-script-args' into 'main'
Fix minify script parameters
Closes #1328
See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/3337
Merged-by: Achilleas Pipinellis <axil@gitlab.com>
Approved-by: Achilleas Pipinellis <axil@gitlab.com>
Co-authored-by: Sarah German <sgerman@gitlab.com>
-rwxr-xr-x | scripts/minify-assets.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/minify-assets.sh b/scripts/minify-assets.sh index cde1c20d..3cca8789 100755 --- a/scripts/minify-assets.sh +++ b/scripts/minify-assets.sh @@ -2,7 +2,7 @@ TARGET="$1" VER="$2" -MINIFY_FLAGS="--html-keep-document-tags --html-keep-whitespace --recursive" +MINIFY_FLAGS=("--html-keep-document-tags" "--html-keep-whitespace" "--recursive") if [ -z "$TARGET" ] || [ -z "$VER" ]; then echo "Usage: $0 <target> <ver>" @@ -33,9 +33,9 @@ fi # Minify assets printf "Optimizing assets..." -printf "HTML..."; $MINIFY_BIN "$MINIFY_FLAGS" --type=html --match="\.html$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true -printf "CSS..." ; $MINIFY_BIN "$MINIFY_FLAGS" --type=css --match="\.css$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true -printf "JSON..."; $MINIFY_BIN "$MINIFY_FLAGS" --type=json --match="\.json$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true -printf "SVG..." ; $MINIFY_BIN "$MINIFY_FLAGS" --type=svg --match="\.svg$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true +printf "HTML..."; $MINIFY_BIN "${MINIFY_FLAGS[@]}" --type=html --match="\.html$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true +printf "CSS..." ; $MINIFY_BIN "${MINIFY_FLAGS[@]}" --type=css --match="\.css$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true +printf "JSON..."; $MINIFY_BIN "${MINIFY_FLAGS[@]}" --type=json --match="\.json$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true +printf "SVG..." ; $MINIFY_BIN "${MINIFY_FLAGS[@]}" --type=svg --match="\.svg$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true echo "Done" |