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
1 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue