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-)