alertmanager-bot: pass version and revision variables
The bot outputs its own version/revision in the log during startup and also in a response to the `/status` command. So make sure both version and revision are set.
This commit is contained in:
parent
1f1a77bdb7
commit
ea1a726b9c
|
@ -17,6 +17,12 @@ buildGoModule rec {
|
||||||
sed "s;/templates/default.tmpl;$out/share&;" -i cmd/alertmanager-bot/main.go
|
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 = ''
|
postInstall = ''
|
||||||
install -Dm644 -t $out/share/templates $src/default.tmpl
|
install -Dm644 -t $out/share/templates $src/default.tmpl
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue