Skip to content

Commit

Permalink
Add a command to update deleted files in SVN (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadNateqi authored Nov 4, 2024
1 parent 784da0e commit ef9215b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ef9215b

Please sign in to comment.