main: --version includes git commit
Include the commit of the build (if available in the build environment), also include the version of `images` in the build; if available. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
parent
f52041ab67
commit
3021afb9f7
3 changed files with 71 additions and 5 deletions
2
Makefile
2
Makefile
|
|
@ -98,7 +98,7 @@ $(BUILDDIR)/%/:
|
|||
|
||||
.PHONY: build
|
||||
build: $(BUILDDIR)/bin/ ## build the binary from source
|
||||
go build -ldflags="-X main.BuildVersion=${VERSION}" -o $<image-builder ./cmd/image-builder/
|
||||
go build -ldflags="-X main.version=${VERSION}" -o $<image-builder ./cmd/image-builder/
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## Remove all built binaries
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue