Skip to content

Commit 4699c1b

Browse files
author
Evan Lezar
committed
Merge branch 'fix-tags' into 'master'
Add NVC_TAG to version header file See merge request nvidia/container-toolkit/libnvidia-container!88
2 parents d77ecf2 + 39ef1da commit 4699c1b

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

Makefile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export DIST_DIR ?= $(CURDIR)/dist
3939
export MAKE_DIR ?= $(CURDIR)/mk
4040
export DEBUG_DIR ?= $(CURDIR)/.debug
4141

42-
#export TAG ?=
4342
#export DISTRIB ?=
4443
#export SECTION ?=
4544

@@ -95,20 +94,10 @@ ARCH ?= $(call getarch)
9594
MAJOR := $(call getdef,NVC_MAJOR,$(LIB_INCS))
9695
MINOR := $(call getdef,NVC_MINOR,$(LIB_INCS))
9796
PATCH := $(call getdef,NVC_PATCH,$(LIB_INCS))
98-
VERSION_STRING := $(subst ",,$(call getdef,NVC_VERSION,$(LIB_INCS)))
97+
# Extract the TAG from the version header file. We strip quotes.
98+
TAG := $(subst ",,$(call getdef,NVC_TAG,$(LIB_INCS)))
9999
VERSION := $(MAJOR).$(MINOR).$(PATCH)
100100

101-
# We try to get a tag to apply to the version
102-
ifeq ($(GIT_TAG:v%=%),$(VERSION))
103-
TAG :=
104-
else
105-
ifneq ($(word 1,$(subst ~, ,$(VERSION_STRING))),$(VERSION))
106-
$(error "git tag '$(VERSION_STRING)' does not start with '$(VERSION)'")
107-
endif
108-
TAG := $(subst $(VERSION)~,,$(VERSION_STRING))
109-
$(info Using TAG=$(TAG))
110-
endif
111-
112101
ifeq ($(MAJOR),)
113102
$(error Invalid major version)
114103
endif

pkg/deb/changelog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ libnvidia-container (1.5.0-1) UNRELEASED; urgency=medium
33
* Promote 1.5.0~rc.2 to 1.5.0-1
44
* [BUILD] Allow REVISION to be specified as make variable
55
* [BUILD] Only copy package files to dist folder
6+
* [BUILD] Define TAG in nvc.h and remove logic to determine it automatically.
67

7-
-- NVIDIA CORPORATION <cudatools@nvidia.com> Tue, 31 Aug 2021 09:00:00 +0200
8+
-- NVIDIA CORPORATION <cudatools@nvidia.com> Thu, 02 Sep 2021 09:00:00 +0200
89

910
libnvidia-container (1.5.0~rc.2-1) experimental; urgency=medium
1011

pkg/rpm/SPECS/libnvidia-container.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ This package contains command-line tools that facilitate using the library.
100100

101101
%changelog
102102

103-
* Tue Aug 31 2021 NVIDIA CORPORATION <cudatools@nvidia.com> 1.5.0-1
103+
* Thu Sep 02 2021 NVIDIA CORPORATION <cudatools@nvidia.com> 1.5.0-1
104104
- Promote 1.5.0-0.1.rc.2 to 1.5.0-1
105105
- [BUILD] Allow REVISION to be specified as make variable
106106
- [BUILD] Only copy package files to dist folder
107+
- [BUILD] Define TAG in nvc.h and remove logic to determine it automatically.
107108

108109
* Tue Aug 17 2021 NVIDIA CORPORATION <cudatools@nvidia.com> 1.5.0-0.1.rc.2
109110
- Remove --fabric-device option to include nvlink and nvswitch devices

src/nvc.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ extern "C" {
1616
#define NVC_MAJOR 1
1717
#define NVC_MINOR 5
1818
#define NVC_PATCH 0
19+
20+
// Specify the release tag.
21+
// For stable releases, this should be defined as empty.
22+
// For release candidates, this should be defined with the format "rc.1"
23+
// The version string NVC_VERSION should also be updated accordingly, using a ~ separator where applicable.
24+
#define NVC_TAG
1925
#define NVC_VERSION "1.5.0"
2026

2127
#define NVC_ARG_MAX 256

0 commit comments

Comments
 (0)