Git inside build (#681)

This commit is contained in:
Commandcracker
2025-03-29 12:25:37 +00:00
committed by GitHub
parent 474eda33ed
commit 04ae9654a2
2 changed files with 6 additions and 3 deletions

View File

@@ -8,6 +8,9 @@
!/pumpkin*/ !/pumpkin*/
!/assets !/assets
# Allow build.rs to read git commit sha
!/.git
# Dependencies # Dependencies
!Cargo.lock !Cargo.lock
!Cargo.toml !Cargo.toml

View File

@@ -1,8 +1,8 @@
FROM rust:1-alpine3.21 AS builder FROM rust:1-alpine3.21 AS builder
ARG GIT_VERSION=Docker
ENV GIT_VERSION=$GIT_VERSION
ENV RUSTFLAGS="-C target-feature=-crt-static" ENV RUSTFLAGS="-C target-feature=-crt-static"
RUN apk add --no-cache musl-dev RUN apk add --no-cache musl-dev \
# Required for git-version
git
WORKDIR /pumpkin WORKDIR /pumpkin
COPY . /pumpkin COPY . /pumpkin