fix: ensure the code is copied over to the new app on clone or rebase

Closes #7706
This commit is contained in:
Jose Diaz-Gonzalez
2025-09-08 00:17:03 -04:00
parent 1d75e9dbbe
commit 03c25dae55
3 changed files with 100 additions and 0 deletions

View File

@@ -13,6 +13,10 @@ trigger-git-post-app-clone-setup() {
fi
fn-plugin-property-clone "git" "$OLD_APP" "$NEW_APP"
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
popd &>/dev/null || pushd "/tmp" >/dev/null
}
trigger-git-post-app-clone-setup "$@"

View File

@@ -14,6 +14,10 @@ trigger-git-post-app-rename-setup() {
fn-plugin-property-clone "git" "$OLD_APP" "$NEW_APP"
fn-plugin-property-destroy "git" "$OLD_APP"
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
popd &>/dev/null || pushd "/tmp" >/dev/null
}
trigger-git-post-app-rename-setup "$@"