make: run gofmt on the version file

This commit is contained in:
c9s 2022-08-24 13:03:00 +08:00
parent 68064bfe44
commit bf09533a6d
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
3 changed files with 4 additions and 3 deletions

View File

@ -190,6 +190,7 @@ pkg/version/version.go: .FORCE
pkg/version/dev.go: .FORCE
BUILD_FLAGS="!release" VERSION_SUFFIX="-dev" bash utils/generate-version-file.sh > $@
gofmt -s -w $@
dev-version: pkg/version/dev.go
git add $<

View File

@ -1,3 +1,4 @@
//go:build !release
// +build !release
package version
@ -5,4 +6,3 @@ package version
const Version = "v1.39.2-5a4d71b0-dev"
const VersionGitRef = "5a4d71b0"

View File

@ -18,12 +18,12 @@ if [[ -n $VERSION_SUFFIX ]] ; then
fi
cat <<END
// +build $BUILD_FLAGS
//go:build !release
// +build !release
package $PACKAGE_NAME
const Version = "${VERSION}"
const VersionGitRef = "${REF}"
END