Skip to content

Commit 0514204

Browse files
committed
Makefile: Add EXTRA_VERSION
Add this new make variable so users can specify build information without modifying the runc version nor the source code. Signed-off-by: Rodrigo Campos <[email protected]> (cherry picked from commit cc2078c)
1 parent 18cdc34 commit 0514204

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ PROJECT := github.com/opencontainers/runc
1212
BUILDTAGS ?= seccomp
1313

1414
COMMIT ?= $(shell git describe --dirty --long --always)
15-
VERSION := $(shell cat ./VERSION)
15+
EXTRA_VERSION :=
16+
VERSION := $(shell cat ./VERSION)$(EXTRA_VERSION)
1617
LDFLAGS_COMMON := -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION)
1718

1819
GOARCH := $(shell $(GO) env GOARCH)

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ sudo make install
5656

5757
`runc` will be installed to `/usr/local/sbin/runc` on your system.
5858

59+
#### Version string customization
60+
61+
You can see the runc version by running `runc --version`. You can append a custom string to the
62+
version using the `EXTRA_VERSION` make variable when building, e.g.:
63+
64+
```bash
65+
make EXTRA_VERSION="+build-1"
66+
```
67+
68+
Bear in mind to include some separator for readability.
5969

6070
#### Build Tags
6171

0 commit comments

Comments
 (0)