diff --git a/Makefile b/Makefile index 4904b0d0c8..fd5af80498 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ include Makefile.tools # Variable Definitions # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # VERSION ?= $(shell git describe --match "v[0-9]*" --abbrev=0 --tags) -ifeq ($(VERSION),) - VERSION ?= $(shell curl https://api.github.com/repos/nginx/agent/releases/latest -s | jq .name -r) +ifeq ($(strip $(VERSION)),) + VERSION := $(shell curl https://api.github.com/repos/nginx/agent/releases/latest -s | jq .name -r) endif COMMIT = $(shell git rev-parse --short HEAD) DATE = $(shell date +%F_%H-%M-%S)