Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests-integration-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{inputs.gitRef}}
fetch-depth: 0

- name: Checkout CF deployment tasks
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{needs.get-sha.outputs.gitRef}}
fetch-depth: 0
- name: Set Up Go
uses: actions/setup-go@v5
with:
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NODES ?= 10
PACKAGES ?= api actor command types util version integration/helpers
LC_ALL = "en_US.UTF-8"

CF_BUILD_VERSION ?= $$(git describe --tags --abbrev=0)
CF_BUILD_SHA ?= $$(git rev-parse --short HEAD)
CF_BUILD_DATE ?= $$(date -u +"%Y-%m-%d")
LD_FLAGS_COMMON=-w -s \
Expand Down
8 changes: 7 additions & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package version

import "github.com/blang/semver/v4"
import (
"strings"

"github.com/blang/semver/v4"
)

const DefaultVersion = "0.0.0-unknown-version"

Expand All @@ -11,6 +15,8 @@ var (
)

func VersionString() string {
// Remove the "v" prefix from the binary in case it is present
binaryVersion = strings.TrimPrefix(binaryVersion, "v")
versionString, err := semver.Make(binaryVersion)
if err != nil {
versionString = semver.MustParse(DefaultVersion)
Expand Down