Merge pull request #120054 from pborzenkov/alertmanager-bot-version

alertmanager-bot: pass version and revision variables
This commit is contained in:
Sandro 2021-04-27 03:43:37 +02:00 committed by GitHub
commit 71b96cc6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
'';