Skip to content

Commit

Permalink
Merge pull request #82 from Lewiscowles1986/patch-2
Browse files Browse the repository at this point in the history
Fix: Repo with no images gets SVN error
  • Loading branch information
jeffpaul authored Jan 28, 2022
2 parents 93c80ab + 2107156 commit d515ea0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,18 @@ svn cp "trunk" "tags/$VERSION"

# Fix screenshots getting force downloaded when clicking them
# https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/
svn propset svn:mime-type image/png assets/*.png || true
svn propset svn:mime-type image/jpeg assets/*.jpg || true
svn propset svn:mime-type image/gif assets/*.gif || true
svn propset svn:mime-type image/svg+xml assets/*.svg || true
if test -d "$SVN_DIR/assets" && test -n "$(find "$SVN_DIR/assets" -maxdepth 1 -name "*.png" -print -quit)"; then
svn propset svn:mime-type "image/png" "$SVN_DIR/assets/*.png" || true
fi
if test -d "$SVN_DIR/assets" && test -n "$(find "$SVN_DIR/assets" -maxdepth 1 -name "*.jpg" -print -quit)"; then
svn propset svn:mime-type "image/jpeg" "$SVN_DIR/assets/*.jpg" || true
fi
if test -d "$SVN_DIR/assets" && test -n "$(find "$SVN_DIR/assets" -maxdepth 1 -name "*.gif" -print -quit)"; then
svn propset svn:mime-type "image/gif" "$SVN_DIR/assets/*.gif" || true
fi
if test -d "$SVN_DIR/assets" && test -n "$(find "$SVN_DIR/assets" -maxdepth 1 -name "*.svg" -print -quit)"; then
svn propset svn:mime-type "image/svg+xml" "$SVN_DIR/assets/*.svg" || true
fi

svn status

Expand Down

0 comments on commit d515ea0

Please sign in to comment.