mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-11 16:29:30 +00:00
Make assets generation deterministic
By passing "-modtime 1" flag into go-bindata command it uses the same unix timestamp (1) for every file in the fake filesystem. Thereby every execution of "make assets" results in the same asset outputs if the inputs were the same. This forces us to set the "Cache-Control" attribute to "no-cache".
This commit is contained in:
parent
8e4c29f5b8
commit
c3850708c1
5
Makefile
5
Makefile
@ -58,8 +58,9 @@ docker:
|
||||
assets:
|
||||
@echo ">> writing assets"
|
||||
-@$(GO) get -u github.com/jteeuwen/go-bindata/...
|
||||
@go-bindata $(bindata_flags) -pkg ui -o ui/bindata.go ui/app/index.html ui/app/script.js
|
||||
@go-bindata $(bindata_flags) -pkg deftmpl -o template/internal/deftmpl/bindata.go template/default.tmpl
|
||||
# Using "-modtime 1" to make assets target deterministic. It sets all file time stamps to unix timestamp 1
|
||||
@go-bindata $(bindata_flags) -modtime 1 -pkg ui -o ui/bindata.go ui/app/index.html ui/app/script.js
|
||||
@go-bindata $(bindata_flags) -modtime 1 -pkg deftmpl -o template/internal/deftmpl/bindata.go template/default.tmpl
|
||||
|
||||
promu:
|
||||
@GOOS=$(shell uname -s | tr A-Z a-z) \
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user