Skip to content

Commit 5199d6e

Browse files
update version make target
1 parent d5279ef commit 5199d6e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PLATFORM = $(OS)/$(ARCH)
1414
DIST = dist/$(PLATFORM)
1515
BIN = $(DIST)/$(BIN_NAME)
1616

17-
VERSION = $(shell ./build-scripts/version.sh pkg/version/version.go)
17+
VERSION = $(shell ./build-scripts/version.sh version/version.go)
1818

1919
GIT_COMMIT?=$(shell git rev-parse --short HEAD)
2020
GIT_DIRTY?=$(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)

build-scripts/version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55

66
version_file=$1
7-
version=$(awk '$1 == "Version" && $2 == "=" { gsub(/"/, "", $3); print $3 }' < "${version_file}")
8-
prerelease=$(awk '$1 == "VersionPrerelease" && $2 == "=" { gsub(/"/, "", $3); print $3 }' < "${version_file}")
7+
version=$(awk -F- '{ print $1 }' < "${version_file}")
8+
prerelease=$(awk -F- '{ print $2 }' < "${version_file}")
99

1010
if [ -n "$prerelease" ]; then
1111
echo "${version}-${prerelease}"

0 commit comments

Comments
 (0)