diff --git a/Makefile b/Makefile index 8142df806e..4560975cf0 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,9 @@ # 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) +endif COMMIT = $(shell git rev-parse --short HEAD) DATE = $(shell date +%F_%H-%M-%S)