Skip to content

Commit 6419fba

Browse files
authored
Merge pull request #4382 from rata/Makefile-override-fixes
[1.1] Revert "allow overriding VERSION value in Makefile" and add EXTRA_VERSION
2 parents f3f71a9 + 0514204 commit 6419fba

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)