File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 3737 uses : actions/checkout@v4
3838 with :
3939 ref : ${{inputs.gitRef}}
40+ fetch-depth : 0
4041
4142 - name : Checkout CF deployment tasks
4243 uses : actions/checkout@v4
Original file line number Diff line number Diff line change 5454 uses : actions/checkout@v4
5555 with :
5656 ref : ${{needs.get-sha.outputs.gitRef}}
57+ fetch-depth : 0
5758 - name : Set Up Go
5859 uses : actions/setup-go@v5
5960 with :
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ NODES ?= 10
33PACKAGES ?= api actor command types util version integration/helpers
44LC_ALL = "en_US.UTF-8"
55
6+ CF_BUILD_VERSION ?= $$(git describe --tags --abbrev=0 )
67CF_BUILD_SHA ?= $$(git rev-parse --short HEAD )
78CF_BUILD_DATE ?= $$(date -u +"%Y-%m-%d" )
89LD_FLAGS_COMMON =-w -s \
Original file line number Diff line number Diff line change 11package version
22
3- import "github.com/blang/semver/v4"
3+ import (
4+ "strings"
5+
6+ "github.com/blang/semver/v4"
7+ )
48
59const DefaultVersion = "0.0.0-unknown-version"
610
1115)
1216
1317func VersionString () string {
18+ // Remove the "v" prefix from the binary in case it is present
19+ binaryVersion = strings .TrimPrefix (binaryVersion , "v" )
1420 versionString , err := semver .Make (binaryVersion )
1521 if err != nil {
1622 versionString = semver .MustParse (DefaultVersion )
You can’t perform that action at this time.
0 commit comments