Skip to content

Commit

Permalink
makefile: Set xk6-neofs version inside VersionDetails
Browse files Browse the repository at this point in the history
Signed-off-by: Evgenii Baidakov <[email protected]>
  • Loading branch information
smallhive committed Sep 13, 2023
1 parent c476f66 commit fa3e8f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
BINARY=xk6-neofs
XK6_VERSION=0.9.2

VERSION ?= $(shell git describe --tags --match "v*" --abbrev=8 2>/dev/null | sed -r 's,^v([0-9]+\.[0-9]+)\.([0-9]+)(-.*)?$$,\1 \2 \3,' | while read mm patch suffix; do if [ -z "$$suffix" ]; then echo $$mm.$$patch; else patch=`expr $$patch + 1`; echo $$mm.$${patch}-pre$$suffix; fi; done)
LDFLAGS:=-s -w -X 'go.k6.io/k6/lib/consts.VersionDetails=$(VERSION)'

# Install required utils
install_xk6:
@echo "=> Installing utils"
Expand All @@ -11,7 +14,7 @@ install_xk6:
# Build xk6-neofs binary
build:
@echo "=> Building binary"
@xk6 build --with github.com/nspcc-dev/xk6-neofs=. --output $(BINARY)
@XK6_BUILD_FLAGS="-ldflags '$(LDFLAGS)'" xk6 build --with github.com/nspcc-dev/xk6-neofs=. --output $(BINARY)

# Run tests
test:
Expand Down

0 comments on commit fa3e8f7

Please sign in to comment.