Package and ship frontend independenlty (#2893)
Enable frontend consumption by downstreams, like debian and nixos Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
This commit is contained in:
parent
71d61c9c91
commit
74ebd3d175
|
@ -36,6 +36,13 @@ jobs:
|
|||
- run: git diff --exit-code
|
||||
- store_test_results:
|
||||
path: ~/test-results
|
||||
- run:
|
||||
name: Save assets
|
||||
command: make assets-tarball
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- .tarballs
|
||||
test:
|
||||
docker:
|
||||
# Whenever the Go version is updated here, .promu.yml should also be updated.
|
||||
|
|
4
Makefile
4
Makefile
|
@ -29,6 +29,10 @@ build-all: assets apiv2 build
|
|||
.PHONY: assets
|
||||
assets: asset/assets_vfsdata.go
|
||||
|
||||
.PHONY: assets-tarball
|
||||
assets-tarball: ui/app/script.js ui/app/index.html
|
||||
scripts/package_assets.sh
|
||||
|
||||
asset/assets_vfsdata.go: ui/app/script.js ui/app/index.html ui/app/lib template/default.tmpl template/email.tmpl
|
||||
GO111MODULE=$(GO111MODULE) $(GO) generate $(GOOPTS) ./asset
|
||||
@$(GOFMT) -w ./asset
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# compress static assets
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
version="$(< VERSION)"
|
||||
mkdir -p .tarballs
|
||||
tar czf .tarballs/alertmanager-web-ui-${version}.tar.gz ui/app/script.js ui/app/index.html
|
Loading…
Reference in New Issue