Merge pull request #2955 from alex-laties/master
allow for VERSION and REVISION to be passed in during docker builds
This commit is contained in:
commit
10f726344d
@ -6,6 +6,8 @@ ENV DOCKER_BUILDTAGS include_oss include_gcs
|
|||||||
ARG GOOS=linux
|
ARG GOOS=linux
|
||||||
ARG GOARCH=amd64
|
ARG GOARCH=amd64
|
||||||
ARG GOARM=6
|
ARG GOARM=6
|
||||||
|
ARG VERSION
|
||||||
|
ARG REVISION
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apk add --no-cache make git file
|
&& apk add --no-cache make git file
|
||||||
|
4
Makefile
4
Makefile
@ -2,8 +2,8 @@
|
|||||||
ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||||
|
|
||||||
# Used to populate version variable in main package.
|
# Used to populate version variable in main package.
|
||||||
VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
|
VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
|
||||||
REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
|
REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
|
||||||
|
|
||||||
|
|
||||||
PKG=github.com/docker/distribution
|
PKG=github.com/docker/distribution
|
||||||
|
Loading…
Reference in New Issue
Block a user