mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
fix: pass SETUPTOOLS_SCM_PRETEND_VERSION to Docker build (#2582)
Co-authored-by: Nazim <nazim@openclaw.ai> Co-authored-by: k9ert <117085+k9ert@users.noreply.github.com>
This commit is contained in:
parent
15d5c414b5
commit
fdea9325f9
2 changed files with 10 additions and 1 deletions
4
.github/workflows/docker-tag.yml
vendored
4
.github/workflows/docker-tag.yml
vendored
|
|
@ -36,7 +36,11 @@ jobs:
|
||||||
|
|
||||||
- name: Run Docker buildx
|
- name: Run Docker buildx
|
||||||
run: |
|
run: |
|
||||||
|
VERSION=${TAG#v}
|
||||||
|
PEP_VERSION=$(echo "$VERSION" | sed 's/-pre/rc/')
|
||||||
|
echo "Building with version: $PEP_VERSION"
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
|
--build-arg SETUPTOOLS_SCM_PRETEND_VERSION="$PEP_VERSION" \
|
||||||
--platform linux/amd64,linux/arm64 \
|
--platform linux/amd64,linux/arm64 \
|
||||||
--tag ghcr.io/$IMAGE_NAME:$TAG \
|
--tag ghcr.io/$IMAGE_NAME:$TAG \
|
||||||
--cache-from type=gha \
|
--cache-from type=gha \
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ ARG DIR=/data/
|
||||||
FROM python:3.10-bookworm AS builder
|
FROM python:3.10-bookworm AS builder
|
||||||
|
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
|
ARG SETUPTOOLS_SCM_PRETEND_VERSION=""
|
||||||
ARG REPO
|
ARG REPO
|
||||||
|
|
||||||
RUN apt update && apt install -y git libusb-1.0-0-dev libudev-dev libffi-dev libssl-dev rustc cargo libpq-dev
|
RUN apt update && apt install -y git libusb-1.0-0-dev libudev-dev libffi-dev libssl-dev rustc cargo libpq-dev
|
||||||
|
|
@ -28,7 +29,11 @@ RUN pip3 install -r requirements.txt
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN pip3 install . --no-deps
|
RUN if [ -n "$SETUPTOOLS_SCM_PRETEND_VERSION" ]; then \
|
||||||
|
SETUPTOOLS_SCM_PRETEND_VERSION=$SETUPTOOLS_SCM_PRETEND_VERSION pip3 install . --no-deps; \
|
||||||
|
else \
|
||||||
|
pip3 install . --no-deps; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.10-slim-bookworm as final
|
FROM python:3.10-slim-bookworm as final
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue