Skip to content
Permalink
Browse files
Change publish script to cut script
  • Loading branch information
eproxus committed Jul 12, 2018
1 parent bd25b73 commit 33f6986246efdcafc32236a4b2a93e1d33db4a9f
Showing 1 changed file with 8 additions and 9 deletions.
@@ -1,13 +1,10 @@
#!/bin/bash

# Install for Git with alias 'meck-publish':
# git config alias.meck-publish '!.scripts/meck-publish.sh'

set -e # Abort on first failure, so we don't mess something up

if [ -z "$1" ]; then
# Missing tag name
echo "usage: meck-publish <version>" >&2
echo "usage: cut <version>" >&2
exit 129
fi
if [ ! -z "$(git status --short)" ]; then
@@ -19,10 +16,12 @@ fi
VSN="$1"

# Update version
sed -i "" -e "s/{vsn, .*}/{vsn, \"$VSN\"}/g" src/meck.app.src
sed -i "" -e "s/@version .*/@version $VSN/g" doc/overview.edoc
git add src/meck.app.src
git add doc/overview.edoc
sed -i "" -e "s/{vsn, .*}/{vsn, \"$VSN\"}/g" src/*.app.src
git add src/*.app.src
if [ -f doc/overview.edoc ]; then
sed -i "" -e "s/@version .*/@version $VSN/g" doc/overview.edoc
git add doc/overview.edoc
fi

# Commit, tag and push
git commit -m "Version $VSN"
@@ -39,5 +38,5 @@ rebar3 hex docs
# Generate and push changelog
github_changelog_generator
git add CHANGELOG.md
git commit -m "Update Changelog for version $VSN"
git commit -m "Update changelog for version $VSN"
git push

0 comments on commit 33f6986

Please sign in to comment.