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 5050 uses : actions/checkout@v4
5151 with :
5252 ref : ${{inputs.gitRef}}
53+ fetch-depth : 0
5354
5455 - name : Checkout cf-acceptance-tests
5556 if : ${{ inputs.name == 'cats' }}
Original file line number Diff line number Diff line change 9999 if : ${{ inputs.run_unit_tests }}
100100 with :
101101 ref : ${{needs.get-sha.outputs.gitRef}}
102+ fetch-depth : 0
102103 - name : Set Up Go
103104 uses : actions/setup-go@v5
104105 if : ${{ inputs.run_unit_tests }}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ FLAKE_ATTEMPTS ?=5
44PACKAGES ?= api actor command types util version integration/helpers
55LC_ALL = "en_US.UTF-8"
66
7+ CF_BUILD_VERSION ?= $$(git describe --tags --abbrev=0 )
78CF_BUILD_SHA ?= $$(git rev-parse --short HEAD )
89CF_BUILD_DATE ?= $$(date -u +"%Y-%m-%d" )
910LD_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