Skip to content

Conversation

@ocean90
Copy link
Contributor

@ocean90 ocean90 commented Mar 23, 2022

Description of the Change

This is a port of 10up/action-wordpress-plugin-deploy#82 to also bring support for gif and SVG images.

Closes #31.

Alternate Designs

None.

Possible Drawbacks

None.

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Added: Add correct mime type for gif and SVG images.

Credits

Props @Lewiscowles1986, @iamdharmesh, @ocean90

This is a port of 10up/action-wordpress-plugin-deploy#82 to also bring support for gif and svg types.
Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocean90 Thanks so much for PR and I'm so sorry for this late review!

Can you fix the glob issue as 10up/action-wordpress-plugin-deploy#99 does? svn doesn't expand the wildcard inside quotes:

Test command output
~/workspace/test/command-palette
130 % svn propset svn:mime-type "image/png" $SVN_DIR/assets/*.png 
property 'svn:mime-type' set on 'assets/banner-1544x500.png'
property 'svn:mime-type' set on 'assets/banner-772x250.png'
property 'svn:mime-type' set on 'assets/icon-128x128.png'
property 'svn:mime-type' set on 'assets/icon-256x256.png'
property 'svn:mime-type' set on 'assets/screenshot-1.png'
property 'svn:mime-type' set on 'assets/screenshot-2.png'

~/workspace/test/command-palette
% svn propset svn:mime-type "image/png" "$SVN_DIR/assets/*.png"
'assets/*.png' is not under version control
svn: E155010: The node '/Users/tenup/workspace/test/command-palette/assets/*.png' was not found.

~/workspace/test/command-palette
1 % svn --version
svn, version 1.14.1 (r1886195)
   compiled Sep 19 2021, 11:27:17 on arm-apple-darwin20.5.0

Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

@dinhtungdu dinhtungdu merged commit 90e0e07 into 10up:develop Jul 5, 2022
@dinhtungdu dinhtungdu added this to the 2.1.1 milestone Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SVG images do not get the correct MIME type

2 participants