Merge pull request #120054 from pborzenkov/alertmanager-bot-version
alertmanager-bot: pass version and revision variables
This commit is contained in:
commit
71b96cc6ce
@ -17,6 +17,12 @@ buildGoModule rec {
|
||||
sed "s;/templates/default.tmpl;$out/share&;" -i cmd/alertmanager-bot/main.go
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
export buildFlagsArray=(
|
||||
"-ldflags=-s -w -X main.Version=v${version} -X main.Revision=${src.rev}"
|
||||
)
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 -t $out/share/templates $src/default.tmpl
|
||||
'';
|
||||
|
Loading…
x
Reference in New Issue
Block a user