diff --git a/deploy.sh b/deploy.sh index 5eeb141..4bcd4b9 100644 --- a/deploy.sh +++ b/deploy.sh @@ -21,6 +21,19 @@ svn update --set-depth infinity tags/$VERSION # Copy files from release to `svn/trunk` rsync -rcm --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded +# Detect and schedule additions and deletions in SVN +svn status | grep '^[!?]' | while IFS= read -r line; do + status="${line:0:1}" + file="${line:8}" + if [ "$status" = "!" ]; then + echo "Deleting: $file" + svn delete "$file" + elif [ "$status" = "?" ]; then + echo "Adding: $file" + svn add "$file" + fi +done + # Prepare the files for commit in SVN svn add --force trunk