diff --git a/.circleci/config.yml b/.circleci/config.yml index 9419f8b98..44cf04abd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,6 +62,9 @@ jobs: - run: make ui-lint - run: make ui-build-module - run: make ui-test + - run: make assets-tarball -o assets + - store_artifacts: + path: web/ui/static.tar.gz - save_cache: key: v3-npm-deps-{{ checksum "web/ui/package-lock.json" }} paths: diff --git a/Makefile b/Makefile index f28a53596..c5b58bf5a 100644 --- a/Makefile +++ b/Makefile @@ -63,10 +63,15 @@ ui-lint: assets: ui-install ui-build .PHONY: assets-compress -assets-compress: +assets-compress: assets @echo '>> compressing assets' scripts/compress_assets.sh +.PHONY: assets-tarball +assets-tarball: assets-compress + @echo '>> packaging assets' + scripts/package_assets.sh + .PHONY: test # If we only want to only test go code we have to change the test target # which is called by all. diff --git a/scripts/package_assets.sh b/scripts/package_assets.sh new file mode 100755 index 000000000..f747d8d51 --- /dev/null +++ b/scripts/package_assets.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# +# compress static assets + +set -euo pipefail + +cd web/ui +find static -type f -name '*.gz' -print0 | xargs -0 tar cf static.tar.gz