mirror of
https://github.com/on4kjm/FLEcli.git
synced 2025-01-31 06:51:02 +01:00
Improve versionning automation
This commit is contained in:
parent
b2648053d3
commit
5c855f85fd
2 changed files with 11 additions and 1 deletions
10
build.sh
10
build.sh
|
@ -2,5 +2,15 @@
|
|||
|
||||
set -e
|
||||
|
||||
VERSION_FROM_GIT=$(git describe --tags)
|
||||
BUILD_TIME=$(date +%F)
|
||||
echo "$VERSION_FROM_GIT"
|
||||
echo "$BUILD_TIME"
|
||||
|
||||
echo "package cmd" > cmd/FLEcli_version.go
|
||||
echo " " >> cmd/FLEcli_version.go
|
||||
echo "//VersionString is the version that will be displayed with the -v switch" >> cmd/FLEcli_version.go
|
||||
echo "const VersionString = \"${VERSION_FROM_GIT} (${BUILD_TIME})\"" >> cmd/FLEcli_version.go
|
||||
|
||||
go build
|
||||
go test ./...
|
|
@ -1,4 +1,4 @@
|
|||
package cmd
|
||||
|
||||
//VersionString is the version that will be displayed with the -v switch
|
||||
const VersionString = "v0.0.0 2020-07-11"
|
||||
const VersionString = "v0.0.0.0-1-gb264805 (2020-07-13)"
|
||||
|
|
Loading…
Reference in a new issue