mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
make: run gofmt on the version file
This commit is contained in:
parent
68064bfe44
commit
bf09533a6d
1
Makefile
1
Makefile
|
@ -190,6 +190,7 @@ pkg/version/version.go: .FORCE
|
||||||
|
|
||||||
pkg/version/dev.go: .FORCE
|
pkg/version/dev.go: .FORCE
|
||||||
BUILD_FLAGS="!release" VERSION_SUFFIX="-dev" bash utils/generate-version-file.sh > $@
|
BUILD_FLAGS="!release" VERSION_SUFFIX="-dev" bash utils/generate-version-file.sh > $@
|
||||||
|
gofmt -s -w $@
|
||||||
|
|
||||||
dev-version: pkg/version/dev.go
|
dev-version: pkg/version/dev.go
|
||||||
git add $<
|
git add $<
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build !release
|
||||||
// +build !release
|
// +build !release
|
||||||
|
|
||||||
package version
|
package version
|
||||||
|
@ -5,4 +6,3 @@ package version
|
||||||
const Version = "v1.39.2-5a4d71b0-dev"
|
const Version = "v1.39.2-5a4d71b0-dev"
|
||||||
|
|
||||||
const VersionGitRef = "5a4d71b0"
|
const VersionGitRef = "5a4d71b0"
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@ if [[ -n $VERSION_SUFFIX ]] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<END
|
cat <<END
|
||||||
// +build $BUILD_FLAGS
|
//go:build !release
|
||||||
|
// +build !release
|
||||||
|
|
||||||
package $PACKAGE_NAME
|
package $PACKAGE_NAME
|
||||||
|
|
||||||
const Version = "${VERSION}"
|
const Version = "${VERSION}"
|
||||||
|
|
||||||
const VersionGitRef = "${REF}"
|
const VersionGitRef = "${REF}"
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
Loading…
Reference in New Issue
Block a user