mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 02:23:34 -06:00
fix: use wildcard COPY for .git directory, use RAILWAY_GIT_COMMIT_SHA as fallback
This commit is contained in:
+4
-2
@@ -38,8 +38,10 @@ WORKDIR /usr/src/banner
|
||||
# Copy dependency files for better layer caching
|
||||
COPY ./Cargo.toml ./Cargo.lock* ./
|
||||
|
||||
# Copy .git directory for build.rs to access Git information
|
||||
COPY ./.git ./.git
|
||||
# Copy .git directory for build.rs to access Git information (if available)
|
||||
# This will copy .git (and .gitignore) if it exists, but won't fail if it doesn't
|
||||
# While normally a COPY requires at least one file, .gitignore should still be available, so this wildcard should always work
|
||||
COPY ./.git* ./
|
||||
|
||||
# Copy build.rs early so it can run during the first build
|
||||
COPY ./build.rs ./
|
||||
|
||||
Reference in New Issue
Block a user