Skip to content

Commit

Permalink
Merge pull request #3267 from thaJeztah/add_default_version
Browse files Browse the repository at this point in the history
Set a dummy-version if none set, and remove unused APT_MIRROR build-arg
  • Loading branch information
neersighted authored Nov 18, 2024
2 parents bb0edd1 + 99ce2e6 commit fba6ffe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-docs
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,7 +33,7 @@ build-dind-ssh:
--build-arg VERSION=${SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER} \
--build-arg ENGINE_VERSION=${TEST_ENGINE_VERSION} \
--build-arg API_VERSION=${TEST_API_VERSION} \
--build-arg APT_MIRROR .
.

.PHONY: build
build:
Expand All @@ -42,7 +42,7 @@ build:
-t docker-sdk-python3 \
-f tests/Dockerfile \
--build-arg VERSION=${SETUPTOOLS_SCM_PRETEND_VERSION_DOCKER} \
--build-arg APT_MIRROR .
.

.PHONY: build-docs
build-docs:
Expand Down
2 changes: 1 addition & 1 deletion tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down

0 comments on commit fba6ffe

Please sign in to comment.