Skip to content

Commit

Permalink
when deploying to wordpress, copy tag in a separate commit in case co…
Browse files Browse the repository at this point in the history
…re Matomo has too many file changes
  • Loading branch information
diosmosis committed Jun 18, 2024
1 parent f76fd97 commit 80b6b29
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ svn add . --force > /dev/null
# Also suppress stdout here
svn status | grep '^\!' | sed 's/! *//' | xargs -I% svn rm %@ > /dev/null

# Copy tag locally to make this a single commit
echo "➤ Copying tag..."
svn cp "trunk" "tags/$VERSION"

# Fix screenshots getting force downloaded when clicking them
# https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/
if test -d "assets" && test -n "$(find "assets" -maxdepth 1 -name "*.png" -print -quit)"; then
Expand All @@ -133,4 +129,14 @@ svn status
echo "➤ Committing files..."
svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"

# Copy tag locally in another commit
echo "➤ Copying tag..."
svn cp "trunk" "tags/$VERSION"

echo "➤ svn status..."
svn status

echo "➤ Committing files..."
svn commit -m "Create tag $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"

echo "✓ Plugin deployed!"

0 comments on commit 80b6b29

Please sign in to comment.