mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-06-23 04:10:25 +00:00
Fix Makefile version and commit variables
The Makefile was updated to fix the version and commit variables. Previously, the VERSION variable was using "git describe" to get the latest tag, but it was failing when there were no tags available. The updated VERSION variable now uses "git describe --always" to fallback to the commit hash if no tags are available. The COMMIT variable was also updated to use "git rev-parse HEAD" to get the commit hash. Summary: Fix Makefile version and commit variables Body: - Update VERSION variable to use "git describe --always" to fallback to commit hash - Update COMMIT variable to use "git rev-parse HEAD" to get commit hash Signed-off-by: SammyOina <sammyoina@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ BUILD_DIR = build
|
||||
SERVICES = manager agent cli
|
||||
CGO_ENABLED ?= 0
|
||||
GOARCH ?= amd64
|
||||
VERSION ?= $(shell git describe --abbrev=0 --tags)
|
||||
VERSION ?= $(shell git describe --abbrev=0 --tags --always)
|
||||
COMMIT ?= $(shell git rev-parse HEAD)
|
||||
TIME ?= $(shell date +%F_%T)
|
||||
CLI_SOURCE = ./cmd/cli/main.go
|
||||
@@ -20,6 +20,8 @@ endef
|
||||
|
||||
.PHONY: all $(SERVICES)
|
||||
|
||||
all: $(SERVICES)
|
||||
|
||||
$(SERVICES):
|
||||
$(call compile_service,$(@))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user