-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to keep git changelog on separate file. Remove MD bold ** from readme.md #4
base: master
Are you sure you want to change the base?
Conversation
These seem like good improvements. I wonder if @kasparsd would be willing to merge these in? Hopefully they are still willing to maintain this project. If not I may take up a fork of my own to merge this in and provide more directions in the read my like #1 is requesting. This has be very very useful to me as I've started working more on WordPress plugins and rely on git. To be honest I don't really use (or know how to use) SVN beyond what's required by wordpress.org. Without this as a resource I'd honestly feel pretty lost since I like the idea of: a) using git for wordpress plugins and b) don't want to fully learn SVN. 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request @twoelevenjay! Please see my comments and suggestions.
@@ -44,7 +44,11 @@ cd $DEST_DIR | |||
# Transform the readme | |||
if [ -f readme.md ]; then | |||
mv readme.md readme.txt | |||
sed -i '' -e 's/^# \(.*\)$/=== \1 ===/' -e 's/ #* ===$/ ===/' -e 's/^## \(.*\)$/== \1 ==/' -e 's/ #* ==$/ ==/' -e 's/^### \(.*\)$/= \1 =/' -e 's/ #* =$/ =/' readme.txt | |||
if [ -f CHANGELOG.md ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twoelevenjay Could we add support for both lowercase and uppercase filenames?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An interesting idea (having it be case-insensitive) however I think the issue is that the file system itself is case sensitive.
The best way to make it support both lowercase and uppercase filenames would be to code for both. Either by duplicating the code for both instances; or by turning the file paths into variables set based on which is found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like:
if [ -f readme.md ]; then
readmeMd='readme.md'
elif [ -f README.md ]; then
readmeMd='readme.md'
else
echo "Cannot find readme markdown file";
exit;
fi
And then do something similar for the changelog.md file...then update the related code to match that idea?
cat CHANGELOG.md >> readme.txt | ||
rm CHANGELOG.md | ||
fi | ||
sed -i '' -e 's/^# \(.*\)$/=== \1 ===/' -e 's/ #* ===$/ ===/' -e 's/^## \(.*\)$/== \1 ==/' -e 's/ #* ==$/ ==/' -e 's/^### \(.*\)$/= \1 =/' -e 's/ #* =$/ =/' -e 's/\*\*//g' readme.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@twoelevenjay I'm not sure I understand this change. WP.org treats **
the same way as Markdown and converts them into strong. Why remove that formatting?
Hey @twoelevenjay I was wondering if you were going to continue with this? I really liked this idea and would love to see these changes merged in! |
Be aware that some plugins have both |
By the way, I noticed that even though this pull request was never acted on, a version of this code is now in place in |
For plugins thatkeep the changelog seperate in CHANGELOG.md with there git repo.
Also on GitHub I have the metadata titles bold with MD **. This was breaking the ability for wordpress.org to parse my readme.txt file.
Example: