Skip to content

Commit 376e875

Browse files
authored
Merge pull request #4370 from rata/main
Revert "allow overriding VERSION value in Makefile" and add EXTRA_VERSION
2 parents 0377d50 + cc2078c commit 376e875

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ BUILDTAGS ?= seccomp urfave_cli_no_docs
1818
BUILDTAGS += $(EXTRA_BUILDTAGS)
1919

2020
COMMIT ?= $(shell git describe --dirty --long --always)
21-
VERSION ?= $(shell cat ./VERSION)
21+
EXTRA_VERSION :=
22+
VERSION := $(shell cat ./VERSION)$(EXTRA_VERSION)
2223
LDFLAGS_COMMON := -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION)
2324

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

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,17 @@ sudo make install
8686

8787
`runc` will be installed to `/usr/local/sbin/runc` on your system.
8888

89+
#### Version string customization
90+
91+
You can see the runc version by running `runc --version`. You can append a custom string to the
92+
version using the `EXTRA_VERSION` make variable when building, e.g.:
93+
94+
```bash
95+
make EXTRA_VERSION="+build-1"
96+
```
97+
98+
Bear in mind to include some separator for readability.
99+
89100
#### Build Tags
90101

91102
`runc` supports optional build tags for compiling support of various features,

0 commit comments

Comments
 (0)