Send .git without its config; correct shallow-clone and version comments
.dockerignore lists .git/config, which holds the clone's remote URL and any credential in it; the build stage is the final image, so it would otherwise ship. git describe does not need it. The build-context test asserts the entry, and the README says the image carries .git without its config. The README now says a shallow clone stamps a tag only when the cloned commit itself carries one, and otherwise the short commit. The comment in src/index.ts says a build reports the version script/build stamps into dist/package.json, and package.json's own version only from source. Model: opus-5-5
This commit is contained in:
+4
-1
@@ -3,7 +3,10 @@
|
||||
# and dropping it would change what the lint phase's prettier check sees.
|
||||
#
|
||||
# .git is deliberately NOT excluded: the build derives the version it stamps
|
||||
# from it (script/version).
|
||||
# from it (script/version). It is sent without its config, which holds the
|
||||
# clone's remote URL and any credential in it, and which the build stage, the
|
||||
# final image, would otherwise carry. git describe does not need it.
|
||||
.git/config
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
|
||||
Reference in New Issue
Block a user