Skip to content

Commit 0c668fa

Browse files
committed
get version from git describe
1 parent 1cc62f9 commit 0c668fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ MANIFEST_DIR ?= /var/lib/nginx-agent
4848
DIRS = $(BUILD_DIR) $(TEST_BUILD_DIR) $(BUILD_DIR)/$(DOCS_DIR) $(BUILD_DIR)/$(DOCS_DIR)/$(PROTO_DIR)
4949
$(shell mkdir -p $(DIRS))
5050

51-
VERSION ?= "v3.0.0"
51+
VERSION ?= $(shell git describe --tags --abbrev=0)
5252
COMMIT = $(shell git rev-parse --short HEAD)
5353
DATE = $(shell date +%F_%H-%M-%S)
5454
LDFLAGS = "-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)"

0 commit comments

Comments
 (0)