From 20bdc591c82b41fca8500e52a4468199d9589540 Mon Sep 17 00:00:00 2001 From: Russel Vela Date: Fri, 6 Oct 2023 17:59:33 -0600 Subject: [PATCH] fix(release): Adds version variable to Makefile --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 651fb50..9b981d1 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,18 @@ PLUGIN_NAME := terraform-provider-venafi-token PLUGIN_DIR := pkg/bin DIST_DIR := pkg/dist +ifdef BUILD_NUMBER +VERSION := $(shell git describe --abbrev=0 --tags)+$(BUILD_NUMBER) +else +VERSION := $(shell git describe --abbrev=0 --tags) +endif + +ifdef RELEASE_VERSION +ifneq ($(RELEASE_VERSION), none) +VERSION := ${RELEASE_VERSION} +endif +endif + # release artifacts must not include the 'v' prefix ZIP_VERSION := $(shell echo ${VERSION} | cut -c 2-)