From 4c95c0c5d0c0a8dcb020c82c84a419c75bbdeaa5 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Wed, 3 Apr 2024 11:42:15 -0500 Subject: [PATCH 01/19] Replace --exclude-from with --filter to allow for .gitignore syntax in .distignore --- deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 50af5f6..fd70da2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -94,8 +94,9 @@ if [[ "$BUILD_DIR" = false ]]; then if [[ -e "$GITHUB_WORKSPACE/.distignore" ]]; then echo "ℹ︎ Using .distignore" # Copy from current branch to /trunk, excluding dotorg assets + # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source - rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded + rsync -rc --filter="merge $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded else echo "ℹ︎ Using .gitattributes" From 225bc5391ec3e85198e637ea1b3baf465c30d6f1 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Wed, 3 Apr 2024 12:24:42 -0500 Subject: [PATCH 02/19] Update README to show that full syntax is supported --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5170895..54852c8 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ If there are files or directories to be excluded from deployment, such as tests #### `.distignore` -**Notes:** `.distignore` is for files to be ignored **only**; it does not currently allow negation like `.gitignore`. This comes from its current expected syntax in WP-CLI's [`wp dist-archive` command](https://github.com/wp-cli/dist-archive-command/). It is possible that this Action will allow for includes via something like a `.distinclude` file in the future, or that WP-CLI itself makes a change that this Action will reflect for consistency. It also will need to contain more than `.gitattributes` because that method **also** respects `.gitignore`. +**Notes:** `.distignore` supports the full `.gitignore` syntax which allows negations such as `!important.txt`. This functionality comes from the WP-CLI's [`wp dist-archive` command](https://github.com/wp-cli/dist-archive-command/). ``` /.wordpress-org From 64424d6b65614a78adabd89e3b3318df97d406b0 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Wed, 14 Aug 2024 09:31:31 -0500 Subject: [PATCH 03/19] Change syntax to dir-merge to see if direcotires are supported in the distignore file --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index fd70da2..960e41c 100755 --- a/deploy.sh +++ b/deploy.sh @@ -96,7 +96,7 @@ if [[ "$BUILD_DIR" = false ]]; then # Copy from current branch to /trunk, excluding dotorg assets # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source - rsync -rc --filter="merge $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded + rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded else echo "ℹ︎ Using .gitattributes" From dd8d664e34a5b50fae9543b14436eca81676a152 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Wed, 14 Aug 2024 09:41:43 -0500 Subject: [PATCH 04/19] Wrap command in quotes to pass static analysis --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 960e41c..a4df93a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -115,7 +115,7 @@ if [[ "$BUILD_DIR" = false ]]; then git config --global user.name "10upbot on GitHub" # Ensure git archive will pick up any changed files in the directory try. - test $(git ls-files --deleted) && git rm $(git ls-files --deleted) + test "$(git ls-files --deleted)" && git rm "$(git ls-files --deleted)" if [ -n "$(git status --porcelain --untracked-files=all)" ]; then git add . git commit -m "Include build step changes" From aaec0a2090dd18d52081906be5889e7cdb24bab4 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 07:40:44 -0500 Subject: [PATCH 05/19] add logging to rsync command --- deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index a4df93a..50403ec 100755 --- a/deploy.sh +++ b/deploy.sh @@ -96,7 +96,8 @@ if [[ "$BUILD_DIR" = false ]]; then # Copy from current branch to /trunk, excluding dotorg assets # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source - rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded + # rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded + rsync -rcv --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded --itemize-changes else echo "ℹ︎ Using .gitattributes" From d14eb773fa0157501c3bd61412b24381096cd219 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 07:54:22 -0500 Subject: [PATCH 06/19] change rsync command --- deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 50403ec..441a489 100755 --- a/deploy.sh +++ b/deploy.sh @@ -93,11 +93,13 @@ if [[ "$BUILD_DIR" = false ]]; then echo "➤ Copying files..." if [[ -e "$GITHUB_WORKSPACE/.distignore" ]]; then echo "ℹ︎ Using .distignore" + ls -la $GITHUB_WORKSPACE/readme.txt + rsync --version # Copy from current branch to /trunk, excluding dotorg assets # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source # rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded - rsync -rcv --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded --itemize-changes + rsync -rcv --filter="merge $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded --itemize-changes else echo "ℹ︎ Using .gitattributes" From 488a537d9b5c3fa77acb801194e1c5eb5f98827d Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 07:57:29 -0500 Subject: [PATCH 07/19] dir merge --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 441a489..d8267dd 100755 --- a/deploy.sh +++ b/deploy.sh @@ -99,7 +99,7 @@ if [[ "$BUILD_DIR" = false ]]; then # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source # rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded - rsync -rcv --filter="merge $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded --itemize-changes + rsync -rcv --filter="dir-merge $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded --itemize-changes else echo "ℹ︎ Using .gitattributes" From 7416faa1e064fb0f9c6ed2fda906cebcbbe8a483 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 07:57:49 -0500 Subject: [PATCH 08/19] remove some logging --- deploy.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index d8267dd..e13b5a7 100755 --- a/deploy.sh +++ b/deploy.sh @@ -93,7 +93,6 @@ if [[ "$BUILD_DIR" = false ]]; then echo "➤ Copying files..." if [[ -e "$GITHUB_WORKSPACE/.distignore" ]]; then echo "ℹ︎ Using .distignore" - ls -la $GITHUB_WORKSPACE/readme.txt rsync --version # Copy from current branch to /trunk, excluding dotorg assets # The --filter flag will allow the full .gitignore syntax to be used in .distignore From d52cd6dc07a5ef347a056ecd58df75464eafc650 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 08:04:36 -0500 Subject: [PATCH 09/19] process file --- deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index e13b5a7..08123b1 100755 --- a/deploy.sh +++ b/deploy.sh @@ -98,7 +98,9 @@ if [[ "$BUILD_DIR" = false ]]; then # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source # rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded - rsync -rcv --filter="dir-merge $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded --itemize-changes + sed 's/^/- /' "$GITHUB_WORKSPACE/.distignore" | sed 's/^- !/+ /' > tmp_rules && \ + rsync -rc --filter="merge tmp_rules" "$GITHUB_WORKSPACE/" trunk/ --delete && \ + rm tmp_rules else echo "ℹ︎ Using .gitattributes" From 3509cb4a6ffa594a3b6e1e56ea37bd256d18f9f6 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 08:34:13 -0500 Subject: [PATCH 10/19] process file again --- deploy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy.sh b/deploy.sh index 08123b1..d20024c 100755 --- a/deploy.sh +++ b/deploy.sh @@ -98,9 +98,9 @@ if [[ "$BUILD_DIR" = false ]]; then # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source # rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded - sed 's/^/- /' "$GITHUB_WORKSPACE/.distignore" | sed 's/^- !/+ /' > tmp_rules && \ - rsync -rc --filter="merge tmp_rules" "$GITHUB_WORKSPACE/" trunk/ --delete && \ - rm tmp_rules + sed 's/^!/+ /' "$GITHUB_WORKSPACE/.distignore" | sed 's/^[^+]/- /' > tmp_rules && \ + rsync -rcv --filter="merge tmp_rules" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes && \ + rm tmp_rules else echo "ℹ︎ Using .gitattributes" From 26675c13f30927d0d6445ca57a68e9c54b6618d0 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 09:49:17 -0500 Subject: [PATCH 11/19] merge plus exclusions --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index d20024c..eead688 100755 --- a/deploy.sh +++ b/deploy.sh @@ -99,7 +99,7 @@ if [[ "$BUILD_DIR" = false ]]; then # The --delete flag will delete anything in destination that no longer exists in source # rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded sed 's/^!/+ /' "$GITHUB_WORKSPACE/.distignore" | sed 's/^[^+]/- /' > tmp_rules && \ - rsync -rcv --filter="merge tmp_rules" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes && \ + rsync -rcv --filter="merge,- tmp_rules" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes && \ rm tmp_rules else echo "ℹ︎ Using .gitattributes" From a646a35e6394ff46a968537805c1c577c41712e1 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 10:05:27 -0500 Subject: [PATCH 12/19] merge plus exclusions --- deploy.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index eead688..0d8a0d7 100755 --- a/deploy.sh +++ b/deploy.sh @@ -97,10 +97,10 @@ if [[ "$BUILD_DIR" = false ]]; then # Copy from current branch to /trunk, excluding dotorg assets # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source - # rsync -rc --filter="dir-merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded - sed 's/^!/+ /' "$GITHUB_WORKSPACE/.distignore" | sed 's/^[^+]/- /' > tmp_rules && \ - rsync -rcv --filter="merge,- tmp_rules" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes && \ - rm tmp_rules + rsync -rcv --filter="merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes + # sed 's/^!/+ /' "$GITHUB_WORKSPACE/.distignore" | sed 's/^[^+]/- /' > tmp_rules && \ + # rsync -rcv --filter="merge tmp_rules" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes && \ + # rm tmp_rules else echo "ℹ︎ Using .gitattributes" From 739c0622552907b728a7b0c8ec79dc1c83f193e6 Mon Sep 17 00:00:00 2001 From: Clayton Collie Date: Mon, 16 Sep 2024 10:08:14 -0500 Subject: [PATCH 13/19] clean up --- deploy.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index 0d8a0d7..29280e8 100755 --- a/deploy.sh +++ b/deploy.sh @@ -93,14 +93,11 @@ if [[ "$BUILD_DIR" = false ]]; then echo "➤ Copying files..." if [[ -e "$GITHUB_WORKSPACE/.distignore" ]]; then echo "ℹ︎ Using .distignore" - rsync --version # Copy from current branch to /trunk, excluding dotorg assets # The --filter flag will allow the full .gitignore syntax to be used in .distignore # The --delete flag will delete anything in destination that no longer exists in source + # The --itemize-changes flag will show the changes made to each file rsync -rcv --filter="merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes - # sed 's/^!/+ /' "$GITHUB_WORKSPACE/.distignore" | sed 's/^[^+]/- /' > tmp_rules && \ - # rsync -rcv --filter="merge tmp_rules" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes && \ - # rm tmp_rules else echo "ℹ︎ Using .gitattributes" From f0209882f89ca8853016e58f0bbb3c7077c4a0b6 Mon Sep 17 00:00:00 2001 From: Konstantinos Galanakis Date: Thu, 29 May 2025 02:31:54 +0300 Subject: [PATCH 14/19] Alternative approach --- deploy.sh | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 6111059..a6c1f6d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -130,11 +130,34 @@ if [[ "$BUILD_DIR" = false ]]; then echo "➤ Copying files..." if [[ -e "$GITHUB_WORKSPACE/.distignore" ]]; then echo "ℹ︎ Using .distignore" + + # Deleting the git data so that the repo is reinitialized + rm -rf "$GITHUB_WORKSPACE/.git" + + # Removing the existing .gitignore file to replace it with the .distignore file + rm "$GITHUB_WORKSPACE/.gitignore" + + # Renaming the .distignore file to .gitignore + cp "$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/.gitignore" + + cd "$GITHUB_WORKSPACE" + + # Initializing the git repo for the new .gitignore file to be taken into account + git init + + git add . > /dev/null 2>&1 + + # Get the list files to be copied into a txt file. + git ls-files > included-files.txt + + # Return to the SVN dir. + cd "$SVN_DIR" + # Copy from current branch to /trunk, excluding dotorg assets - # The --filter flag will allow the full .gitignore syntax to be used in .distignore + # The --files-from flag will only copy files from the included files list # The --delete flag will delete anything in destination that no longer exists in source # The --itemize-changes flag will show the changes made to each file - rsync -rcv --filter="merge,- $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes + rsync -rcv --files-from="$GITHUB_WORKSPACE/included-files.txt" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes else echo "ℹ︎ Using .gitattributes" From fddcb1742729f9ba1f70c3f12b31c193e50bad6f Mon Sep 17 00:00:00 2001 From: Konstantinos Galanakis Date: Fri, 16 Jan 2026 16:12:49 +0200 Subject: [PATCH 15/19] Change the rsync arguments --- deploy.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index a6c1f6d..50b27f2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -155,9 +155,26 @@ if [[ "$BUILD_DIR" = false ]]; then # Copy from current branch to /trunk, excluding dotorg assets # The --files-from flag will only copy files from the included files list - # The --delete flag will delete anything in destination that no longer exists in source # The --itemize-changes flag will show the changes made to each file - rsync -rcv --files-from="$GITHUB_WORKSPACE/included-files.txt" "$GITHUB_WORKSPACE/" trunk/ --delete --itemize-changes + rsync -rcv --files-from="$GITHUB_WORKSPACE/included-files.txt" "$GITHUB_WORKSPACE/" trunk/ --itemize-changes + + # Delete files in trunk/ that are not in the included files list + # This handles the case where files were previously committed but should now be excluded + # When using --files-from, --delete doesn't remove files not in the list, so we do it manually + if [ -d "trunk" ]; then + cd "$SVN_DIR/trunk" + # Find all files in trunk/ and check if they're in the included list + find . -type f -print0 | while IFS= read -r -d '' file; do + # Remove leading ./ from the file path for comparison + file_path="${file#./}" + # Check if this file is in the included files list + if ! grep -Fxq "$file_path" "$GITHUB_WORKSPACE/included-files.txt"; then + echo "ℹ︎ Removing excluded file: $file_path" + rm -f "$file" + fi + done + cd "$SVN_DIR" + fi else echo "ℹ︎ Using .gitattributes" From 0c4d8fb09f236e4229baa25adb79108ca8b222ff Mon Sep 17 00:00:00 2001 From: Konstantinos Galanakis Date: Fri, 16 Jan 2026 16:34:55 +0200 Subject: [PATCH 16/19] Remove empty directories when preparing for the deployment --- deploy.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deploy.sh b/deploy.sh index 50b27f2..9e075ef 100755 --- a/deploy.sh +++ b/deploy.sh @@ -173,6 +173,16 @@ if [[ "$BUILD_DIR" = false ]]; then rm -f "$file" fi done + + # Remove empty directories that may have been left behind + # Process directories from deepest to shallowest (-depth) to avoid issues + # This ensures child directories are removed before parent directories + find . -type d -depth -mindepth 1 -empty -print0 | while IFS= read -r -d '' dir; do + dir_path="${dir#./}" + echo "ℹ︎ Removing empty directory: $dir_path" + rmdir "$dir" 2>/dev/null || true + done + cd "$SVN_DIR" fi else From d709344edfc0e6551aec24a80a6e1294f52dc9e5 Mon Sep 17 00:00:00 2001 From: Konstantinos Galanakis Date: Fri, 16 Jan 2026 16:45:59 +0200 Subject: [PATCH 17/19] Iterate over the empty folder to delete all of them no matter what depth they have --- deploy.sh | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/deploy.sh b/deploy.sh index 9e075ef..999d58d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -175,13 +175,29 @@ if [[ "$BUILD_DIR" = false ]]; then done # Remove empty directories that may have been left behind - # Process directories from deepest to shallowest (-depth) to avoid issues - # This ensures child directories are removed before parent directories - find . -type d -depth -mindepth 1 -empty -print0 | while IFS= read -r -d '' dir; do - dir_path="${dir#./}" - echo "ℹ︎ Removing empty directory: $dir_path" - rmdir "$dir" 2>/dev/null || true + # Iterate until no more empty directories are found + # This handles cases where removing a child directory makes the parent empty + iterations=0 + max_iterations=100 # Safety limit to prevent infinite loops + while [ $iterations -lt $max_iterations ]; do + # Find empty directories, processing from deepest to shallowest + empty_dirs=$(find . -type d -depth -mindepth 1 -empty) + if [ -z "$empty_dirs" ]; then + # No more empty directories found + break + fi + # Remove all found empty directories + echo "$empty_dirs" | while IFS= read -r dir; do + if rmdir "$dir" 2>/dev/null; then + dir_path="${dir#./}" + echo "ℹ︎ Removing empty directory: $dir_path" + fi + done + iterations=$((iterations + 1)) done + if [ $iterations -ge $max_iterations ]; then + echo "⚠ Warning: Reached maximum iterations ($max_iterations) for empty directory removal" + fi cd "$SVN_DIR" fi From 500a4a66d832b56bf7d673291b324b1e12b11a67 Mon Sep 17 00:00:00 2001 From: Konstantinos Galanakis Date: Fri, 16 Jan 2026 16:51:57 +0200 Subject: [PATCH 18/19] Increase max_iterations limit for empty directory removal --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 999d58d..53bf281 100755 --- a/deploy.sh +++ b/deploy.sh @@ -178,7 +178,7 @@ if [[ "$BUILD_DIR" = false ]]; then # Iterate until no more empty directories are found # This handles cases where removing a child directory makes the parent empty iterations=0 - max_iterations=100 # Safety limit to prevent infinite loops + max_iterations=200 # Safety limit to prevent infinite loops while [ $iterations -lt $max_iterations ]; do # Find empty directories, processing from deepest to shallowest empty_dirs=$(find . -type d -depth -mindepth 1 -empty) From de14c10b91b59f58299634010643b99667477a50 Mon Sep 17 00:00:00 2001 From: Konstantinos Galanakis Date: Fri, 16 Jan 2026 17:11:47 +0200 Subject: [PATCH 19/19] Add file listing output for debugging during copy process --- deploy.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deploy.sh b/deploy.sh index 53bf281..be1ab4a 100755 --- a/deploy.sh +++ b/deploy.sh @@ -150,6 +150,11 @@ if [[ "$BUILD_DIR" = false ]]; then # Get the list files to be copied into a txt file. git ls-files > included-files.txt + # Display the list of files to be copied + file_count=$(wc -l < included-files.txt) + echo "ℹ︎ Files to be copied ($file_count files):" + cat included-files.txt | sed 's/^/ /' + # Return to the SVN dir. cd "$SVN_DIR"