Skip to content

Commit

Permalink
Chore/release: Use gnu-sed on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
rxaviers committed Aug 5, 2020
1 parent 69ab42e commit 50bea2b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions chore/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ function error {

function update_version {
h1 Update package.json '`versions`' attribute
sed -i.orig 's/"version": "[^"]\+"/"version": "'$1'"/' package.json &&
SED=sed
if [ :`uname` = :Darwin ]; then
SED=gsed
fi
$SED -i.orig 's/"version": "[^"]\+"/"version": "'$1'"/' package.json &&
git commit -a -m $1 &&
git show
}
Expand All @@ -63,7 +67,7 @@ function build {
# Yeap, again. Now including the new version in the dist files.
npm run build > /dev/null || error Build failed

git add dist/* > /dev/null &&
git add -f dist/* dist-esm/* > /dev/null &&
git commit -a -m "Build: Include distribution files" > /dev/null &&
git show --stat ||
error Failed including distribution files
Expand Down

0 comments on commit 50bea2b

Please sign in to comment.