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 37
37
uses : actions/checkout@v4
38
38
with :
39
39
ref : ${{inputs.gitRef}}
40
+ fetch-depth : 0
40
41
41
42
- name : Checkout CF deployment tasks
42
43
uses : actions/checkout@v4
Original file line number Diff line number Diff line change 54
54
uses : actions/checkout@v4
55
55
with :
56
56
ref : ${{needs.get-sha.outputs.gitRef}}
57
+ fetch-depth : 0
57
58
- name : Set Up Go
58
59
uses : actions/setup-go@v5
59
60
with :
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ NODES ?= 10
3
3
PACKAGES ?= api actor command types util version integration/helpers
4
4
LC_ALL = "en_US.UTF-8"
5
5
6
+ CF_BUILD_VERSION ?= $$(git describe --tags --abbrev=0 )
6
7
CF_BUILD_SHA ?= $$(git rev-parse --short HEAD )
7
8
CF_BUILD_DATE ?= $$(date -u +"%Y-%m-%d" )
8
9
LD_FLAGS_COMMON =-w -s \
Original file line number Diff line number Diff line change 1
1
package version
2
2
3
- import "github.com/blang/semver/v4"
3
+ import (
4
+ "strings"
5
+
6
+ "github.com/blang/semver/v4"
7
+ )
4
8
5
9
const DefaultVersion = "0.0.0-unknown-version"
6
10
11
15
)
12
16
13
17
func VersionString () string {
18
+ // Remove the "v" prefix from the binary in case it is present
19
+ binaryVersion = strings .TrimPrefix (binaryVersion , "v" )
14
20
versionString , err := semver .Make (binaryVersion )
15
21
if err != nil {
16
22
versionString = semver .MustParse (DefaultVersion )
You can’t perform that action at this time.
0 commit comments