Skip to content

Commit 8bc6d48

Browse files
committed
Release script to make life a bit easier
1 parent a845f71 commit 8bc6d48

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
### 0.22.0
23
* d112a4a - Merge pull request #134 from elliottmurray/multiple-custom-provider-header (Elliott Murray, Mon May 11 16:32:49 2020 +0100)
34
* 58f8e6b - Fix some style issues (Elliott Murray, Wed Apr 29 12:35:00 2020 +0100)

pact/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Pact version info."""
22

3-
__version__ = '1.0.0'
3+
__version__ = '0.22.0'

release_prep.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
VERSION=$1
4+
5+
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]*$ ]]; then
6+
echo "Updating version $VERSION."
7+
else
8+
echo "Invalid version number $VERSION"
9+
exit 1;
10+
fi
11+
12+
TAG_NAME="v$VERSION"
13+
14+
echo "Releasing $TAG_NAME"
15+
16+
echo -e "`git log --pretty=format:' * %h - %s (%an, %ad)' $TAG_NAME..HEAD`\n$(cat CHANGELOG.md)" > CHANGELOG.md
17+
18+
echo "Appended Changelog to $VERSION"
19+
20+
git add CHANGELOG.md pact/__version__.py
21+
git commit -m "Releasing version $VERSION"
22+
23+
git tag -a "$TAG_NAME" -m "Releasing version $VERSION"
24+
25+
# && git push origin master --tags`
26+
27+

0 commit comments

Comments
 (0)