Only tag unchanged binaries.

This commit is contained in:
Nuno Cruces 2022-11-15 12:14:55 +00:00
parent f679cf4d7f
commit c2da2ba968

View file

@ -5,8 +5,8 @@ cd "${BASH_SOURCE%/*}"
go generate ../../...
TAG=$(git tag --points-at HEAD)
echo 'package main; const tag = "'$TAG'"' > tag.go
TAG=$(git diff --quiet && git tag --points-at HEAD || true)
echo 'package main; const tag = "'$TAG'"' | gofmt > tag.go
printf '#!/bin/sh\nexec zenity.exe --unixeol --cygpath "$@"' > zenity
go run github.com/josephspurrier/goversioninfo/cmd/goversioninfo "-product-version=$TAG"