fix: keep track of the source image when building an app via git:from-image
This change fixes issues with ps:rebuild not working as expected - essentially ignoring files in the repo - as well as adds tests. Closes #5518
This commit is contained in:
@@ -256,6 +256,7 @@ cmd-git-report-single() {
|
||||
"--git-keep-git-dir: $(fn-plugin-property-get "git" "$APP" "keep-git-dir" "false")"
|
||||
"--git-rev-env-var: $(fn-plugin-property-get "git" "$APP" "rev-env-var" "GIT_REV")"
|
||||
"--git-sha: $(fn-git-cmd "$APP_ROOT" rev-parse --short HEAD 2>/dev/null || false)"
|
||||
"--git-source-image: $(fn-git-source-image "$APP")"
|
||||
"--git-last-updated-at: $(fn-git-last-updated-at "$APP")"
|
||||
)
|
||||
|
||||
@@ -544,6 +545,13 @@ fn-git-setup-build-dir-submodules() {
|
||||
fi
|
||||
}
|
||||
|
||||
fn-git-source-image() {
|
||||
declare desc="retrieve the source-image for a given application"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-get "git" "$APP" "source-image" ""
|
||||
}
|
||||
|
||||
fn-git-use-worktree() {
|
||||
declare desc="detects whether to use git worktree"
|
||||
local GIT_VERSION MAJOR_VERSION MINOR_VERSION
|
||||
|
||||
Reference in New Issue
Block a user