Remove Dockerfile version fallback from nix build path
Nix builds should resolve version from default.nix or nixpkgs only — falling back to Dockerfile's CONTAINER_APP_VERSION masks real errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b5a366d829
commit
b3dfb8d13c
1 changed files with 1 additions and 8 deletions
|
|
@ -143,14 +143,7 @@ jobs:
|
|||
VERSION=$(grep -m1 '^\s*version\s*=\s*"' "$NIX_FILE" \
|
||||
| sed 's/.*"\(.*\)".*/\1/' || true)
|
||||
|
||||
# Fall back to CONTAINER_APP_VERSION from Dockerfile
|
||||
if [ -z "$VERSION" ] && [ -f "containers/$CONTAINER/Dockerfile" ]; then
|
||||
VERSION=$(grep -m1 '^ARG CONTAINER_APP_VERSION=' \
|
||||
"containers/$CONTAINER/Dockerfile" \
|
||||
| sed 's/^ARG CONTAINER_APP_VERSION=//')
|
||||
fi
|
||||
|
||||
# Last resort: nix eval for nixpkgs packages
|
||||
# Fall back to nix eval for nixpkgs packages
|
||||
if [ -z "$VERSION" ]; then
|
||||
VERSION=$(nix --extra-experimental-features "nix-command flakes" \
|
||||
eval --raw "nixpkgs#${CONTAINER}.version")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue