Skip to content

Commit

Permalink
Merge branch 'fix-tags' into 'master'
Browse files Browse the repository at this point in the history
Add NVC_TAG to version header file

See merge request nvidia/container-toolkit/libnvidia-container!88
  • Loading branch information
Evan Lezar committed Sep 2, 2021
2 parents d77ecf2 + 39ef1da commit 4699c1b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
15 changes: 2 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?=

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pkg/deb/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]> Tue, 31 Aug 2021 09:00:00 +0200
-- NVIDIA CORPORATION <[email protected]> Thu, 02 Sep 2021 09:00:00 +0200

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

Expand Down
3 changes: 2 additions & 1 deletion pkg/rpm/SPECS/libnvidia-container.spec
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ This package contains command-line tools that facilitate using the library.

%changelog

* Tue Aug 31 2021 NVIDIA CORPORATION <[email protected]> 1.5.0-1
* Thu Sep 02 2021 NVIDIA CORPORATION <[email protected]> 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 <[email protected]> 1.5.0-0.1.rc.2
- Remove --fabric-device option to include nvlink and nvswitch devices
Expand Down
6 changes: 6 additions & 0 deletions src/nvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4699c1b

Please sign in to comment.