diff --git a/Makefile b/Makefile index 80ccbddf..c281b8f1 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,6 @@ export DIST_DIR ?= $(CURDIR)/dist export MAKE_DIR ?= $(CURDIR)/mk export DEBUG_DIR ?= $(CURDIR)/.debug -#export TAG ?= #export DISTRIB ?= #export SECTION ?= @@ -95,20 +94,10 @@ ARCH ?= $(call getarch) MAJOR := $(call getdef,NVC_MAJOR,$(LIB_INCS)) MINOR := $(call getdef,NVC_MINOR,$(LIB_INCS)) PATCH := $(call getdef,NVC_PATCH,$(LIB_INCS)) -VERSION_STRING := $(subst ",,$(call getdef,NVC_VERSION,$(LIB_INCS))) +# Extract the TAG from the version header file. We strip quotes. +TAG := $(subst ",,$(call getdef,NVC_TAG,$(LIB_INCS))) VERSION := $(MAJOR).$(MINOR).$(PATCH) -# We try to get a tag to apply to the version -ifeq ($(GIT_TAG:v%=%),$(VERSION)) -TAG := -else -ifneq ($(word 1,$(subst ~, ,$(VERSION_STRING))),$(VERSION)) -$(error "git tag '$(VERSION_STRING)' does not start with '$(VERSION)'") -endif -TAG := $(subst $(VERSION)~,,$(VERSION_STRING)) -$(info Using TAG=$(TAG)) -endif - ifeq ($(MAJOR),) $(error Invalid major version) endif diff --git a/pkg/deb/changelog b/pkg/deb/changelog index 780617b8..5e2f2f0b 100644 --- a/pkg/deb/changelog +++ b/pkg/deb/changelog @@ -3,8 +3,9 @@ libnvidia-container (1.5.0-1) UNRELEASED; urgency=medium * Promote 1.5.0~rc.2 to 1.5.0-1 * [BUILD] Allow REVISION to be specified as make variable * [BUILD] Only copy package files to dist folder + * [BUILD] Define TAG in nvc.h and remove logic to determine it automatically. - -- NVIDIA CORPORATION Tue, 31 Aug 2021 09:00:00 +0200 + -- NVIDIA CORPORATION Thu, 02 Sep 2021 09:00:00 +0200 libnvidia-container (1.5.0~rc.2-1) experimental; urgency=medium diff --git a/pkg/rpm/SPECS/libnvidia-container.spec b/pkg/rpm/SPECS/libnvidia-container.spec index 8420da8c..b45665f1 100644 --- a/pkg/rpm/SPECS/libnvidia-container.spec +++ b/pkg/rpm/SPECS/libnvidia-container.spec @@ -100,10 +100,11 @@ This package contains command-line tools that facilitate using the library. %changelog -* Tue Aug 31 2021 NVIDIA CORPORATION 1.5.0-1 +* Thu Sep 02 2021 NVIDIA CORPORATION 1.5.0-1 - Promote 1.5.0-0.1.rc.2 to 1.5.0-1 - [BUILD] Allow REVISION to be specified as make variable - [BUILD] Only copy package files to dist folder +- [BUILD] Define TAG in nvc.h and remove logic to determine it automatically. * Tue Aug 17 2021 NVIDIA CORPORATION 1.5.0-0.1.rc.2 - Remove --fabric-device option to include nvlink and nvswitch devices diff --git a/src/nvc.h b/src/nvc.h index 2c4aa32d..e71b4297 100644 --- a/src/nvc.h +++ b/src/nvc.h @@ -16,6 +16,12 @@ extern "C" { #define NVC_MAJOR 1 #define NVC_MINOR 5 #define NVC_PATCH 0 + +// Specify the release tag. +// For stable releases, this should be defined as empty. +// For release candidates, this should be defined with the format "rc.1" +// The version string NVC_VERSION should also be updated accordingly, using a ~ separator where applicable. +#define NVC_TAG #define NVC_VERSION "1.5.0" #define NVC_ARG_MAX 256