mirror of https://github.com/docker/docker-py.git
Set a dummy-version if none set
Make sure the Dockerfiles can be built even if no VERSION build-arg is passed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
bb0edd1f66
commit
504ce6193c
|
@ -6,7 +6,7 @@ FROM python:${PYTHON_VERSION}
|
|||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
ARG VERSION
|
||||
ARG VERSION=0.0.0.dev0
|
||||
RUN --mount=type=cache,target=/cache/pip \
|
||||
PIP_CACHE_DIR=/cache/pip \
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION} \
|
||||
|
|
|
@ -13,7 +13,7 @@ RUN addgroup --gid $gid sphinx \
|
|||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
ARG VERSION
|
||||
ARG VERSION=0.0.0.dev0
|
||||
RUN --mount=type=cache,target=/cache/pip \
|
||||
PIP_CACHE_DIR=/cache/pip \
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION} \
|
||||
|
|
2
Makefile
2
Makefile
|
@ -13,7 +13,7 @@ endif
|
|||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER ?= $(shell git describe --match '[0-9]*' --dirty='.m' --always --tags 2>/dev/null | sed -r 's/-([0-9]+)/.dev\1/' | sed 's/-/+/')
|
||||
ifeq ($(SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER),)
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER = "dev"
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER = "0.0.0.dev0"
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
|
|
|
@ -28,7 +28,7 @@ RUN curl -sSL -o /opt/docker-credential-pass.tar.gz \
|
|||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
ARG VERSION
|
||||
ARG VERSION=0.0.0.dev0
|
||||
RUN --mount=type=cache,target=/cache/pip \
|
||||
PIP_CACHE_DIR=/cache/pip \
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION} \
|
||||
|
|
Loading…
Reference in New Issue