forked from prometheus/prometheus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace vfsgen with embed for static web assets (prometheus#9719)
* remove vfsgen usages Signed-off-by: Jan Fajerski <jfajersk@redhat.com> * web: use embed package for static assets This requires go 1.16. Signed-off-by: Jan Fajerski <jfajersk@redhat.com> * circleci: drop go generate in web/ui Signed-off-by: Jan Fajerski <jfajersk@redhat.com> * Makefile: compress web assets before build This commit add compression before (and decompression after) prometheus is build. This ensures that gzipped assets are embeded in the prometheus binary, if the builtinassets build tag is passed. If the build tag is not passed this step is still executed but has no effect. All this is executed in a subshell so that we can run the decompress step even if the build step fails, but retain the exit code of promu. This cleanup could also cover interrupts, but I left that out for now. Signed-off-by: Jan Fajerski <jfajersk@redhat.com> * [FIXME]: add new module dependency on common/assets and temp replace Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
- Loading branch information
Showing
10 changed files
with
35 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ benchmark.txt | |
|
||
npm_licenses.tar.bz2 | ||
/web/ui/static/react | ||
/web/ui/assets_vfsdata.go | ||
|
||
/vendor | ||
/.build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# [de]compress static assets | ||
|
||
find web/ui/templates web/ui/static -type f -exec gzip "$@" {} \; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters