Skip to content

Commit

Permalink
Release script to make life a bit easier
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottmurray committed May 21, 2020
1 parent a845f71 commit 8bc6d48
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

### 0.22.0
* d112a4a - Merge pull request #134 from elliottmurray/multiple-custom-provider-header (Elliott Murray, Mon May 11 16:32:49 2020 +0100)
* 58f8e6b - Fix some style issues (Elliott Murray, Wed Apr 29 12:35:00 2020 +0100)
Expand Down
2 changes: 1 addition & 1 deletion pact/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Pact version info."""

__version__ = '1.0.0'
__version__ = '0.22.0'
27 changes: 27 additions & 0 deletions release_prep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

VERSION=$1

if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]*$ ]]; then
echo "Updating version $VERSION."
else
echo "Invalid version number $VERSION"
exit 1;
fi

TAG_NAME="v$VERSION"

echo "Releasing $TAG_NAME"

echo -e "`git log --pretty=format:' * %h - %s (%an, %ad)' $TAG_NAME..HEAD`\n$(cat CHANGELOG.md)" > CHANGELOG.md

echo "Appended Changelog to $VERSION"

git add CHANGELOG.md pact/__version__.py
git commit -m "Releasing version $VERSION"

git tag -a "$TAG_NAME" -m "Releasing version $VERSION"

# && git push origin master --tags`


0 comments on commit 8bc6d48

Please sign in to comment.