Derive the image's version from the .git in the build context (closes #366)
check / check (push) Successful in 3m52s
check / check (push) Successful in 3m52s
A plain docker build, as upaas runs it, passed no VERSION build arg and had no .git, so every such image stamped "unknown". .dockerignore now sends .git and every tracked file (an excluded one would read as deleted and mark the version -dirty), and the VERSION build arg loses its "unknown" default, so script/version derives the version inside the build. A VERSION build arg still takes precedence. The builder stage installs git and fails when its context carries .git and the version still comes out "unknown". Model: opus-5-5
This commit is contained in:
+5
-4
@@ -1,14 +1,15 @@
|
||||
# .git is deliberately NOT excluded: the build derives the version it stamps
|
||||
# into the binary from it (script/version). Nor is any tracked file: git in
|
||||
# the build would see it as deleted and mark the version -dirty. Only
|
||||
# untracked files belong here.
|
||||
#
|
||||
# .ci-fingerprint is deliberately NOT excluded: it is the CI cache barrier
|
||||
# that keeps the check stages from replaying a cached pass. See the lint
|
||||
# stage of the Dockerfile.
|
||||
.git/
|
||||
bin/
|
||||
# Extracted from 3p/ by `make assets` inside the build; a host copy is not
|
||||
# needed. The tarball in 3p/ must stay in the context.
|
||||
static/js/alpine.min.js
|
||||
*.md
|
||||
LICENSE
|
||||
.editorconfig
|
||||
.env
|
||||
.env.*
|
||||
*.db
|
||||
|
||||
Reference in New Issue
Block a user