From c2da2ba9687466d71c9013ca565427f0d08bb452 Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Tue, 15 Nov 2022 12:14:55 +0000 Subject: [PATCH] Only tag unchanged binaries. --- cmd/zenity/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/zenity/build.sh b/cmd/zenity/build.sh index 60eef55..c0ae440 100755 --- a/cmd/zenity/build.sh +++ b/cmd/zenity/build.sh @@ -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"