Merge pull request #165 from mslacken/version

Version
This commit is contained in:
Christian Goll
2021-12-08 21:27:34 +01:00
committed by GitHub
6 changed files with 55 additions and 2 deletions

View File

@@ -5,6 +5,12 @@ RELEASE ?= 1
SRC ?= main
VERSION_FULL ?= $(shell test -e .git && git describe --tags --long --first-parent)
ifeq ($(VERSION_FULL),)
VERSION_FULL := $(VERSION)
endif
# auto installed tooling
TOOLS_DIR := .tools
TOOLS_BIN := $(TOOLS_DIR)/bin
@@ -116,7 +122,7 @@ debfiles: debian
cp wwclient $(DESTDIR)/var/warewulf/overlays/system/debian/warewulf/bin/
wwctl:
cd cmd/wwctl; GOOS=linux go build -mod vendor -tags "$(WW_BUILD_GO_BUILD_TAGS)" -o ../../wwctl
cd cmd/wwctl; GOOS=linux go build -ldflags="-X 'github.com/hpcng/warewulf/internal/pkg/version.Version=$(VERSION_FULL)'" -mod vendor -tags "$(WW_BUILD_GO_BUILD_TAGS)" -o ../../wwctl
wwclient:
cd cmd/wwclient; CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -ldflags '-extldflags -static' -o ../../wwclient