Ability to keep git changelog on separate file. Remove MD bold ** from readme.md#4
Ability to keep git changelog on separate file. Remove MD bold ** from readme.md#4twoelevenjay wants to merge 2 commits intokasparsd:masterfrom
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. 😄 |
kasparsd
left a comment
There was a problem hiding this comment.
Thanks for the pull request @twoelevenjay! Please see my comments and suggestions.
| 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.
@twoelevenjay Could we add support for both lowercase and uppercase filenames?
There was a problem hiding this comment.
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.
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.
@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: