Skip to content

Commit

Permalink
Make release sed command work on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Mar 11, 2017
1 parent ed559be commit 97b1943
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash

case $OSTYPE in
darwin*)
alias sed=gsed;;
esac

release_date=`date +%Y-%m-%d`

verify_args() {
Expand All @@ -24,7 +29,7 @@ update_changelog() {
# cut out empty "Fixed", "Added", or "Changed" sections
remove_empty_sections

local match='## \[unreleased\] \- unreleased'
local match="## \[unreleased\] \- unreleased"
local heading="## [$version] - $release_date"
sed -i "/$match/c $heading" CHANGELOG.md
}
Expand Down

0 comments on commit 97b1943

Please sign in to comment.