Skip to content
Permalink
Browse files
Update publish script
  • Loading branch information
eproxus committed Jun 29, 2017
1 parent 5d8ff85 commit acd90c258ab0a0962f54a62c5ef25c7fa8143957
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 45 deletions.
@@ -0,0 +1,36 @@
#!/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
exit 129
fi
if [ ! -z "$(git status --short)" ]; then
# Sanity check
echo "fatal: dirty repository" >&2
exit 128
fi

VSN="$1"

# Update version in .app file
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

# Commit, tag and push
git commit -m "Version $VSN"
git tag -s $1 -m "Version $VSN"

git push && git push --tags
rebar3 hex publish

github_changelog_generator
git add CHANGELOG.md
git commit -m "Update Changelog for version $VSN"

This file was deleted.

0 comments on commit acd90c2

Please sign in to comment.