Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Owner

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?

Copy link
Copy Markdown

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?

Copy link
Copy Markdown

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
Copy link
Copy Markdown
Owner

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?

fi

# svn addremove
Expand Down