From 965c5a71098e2f16890df5af6809f8b247399911 Mon Sep 17 00:00:00 2001 From: Oliver O'Mahony Date: Fri, 5 Jul 2024 11:32:30 +0100 Subject: [PATCH 1/2] fix version assignment --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4904b0d0c8..4fd35aaf14 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 ($(VERSION),undefined) + 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) From 09eefe0cc80ed8ce9499f22802d1284e833508cb Mon Sep 17 00:00:00 2001 From: Oliver O'Mahony Date: Fri, 5 Jul 2024 12:20:55 +0100 Subject: [PATCH 2/2] fix version --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4fd35aaf14..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),undefined) - 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)