|
a |
|
b/release.sh |
|
|
1 |
#!/bin/bash |
|
|
2 |
set -e |
|
|
3 |
|
|
|
4 |
if [[ $# -eq 0 ]] ; then |
|
|
5 |
echo 'usage: ./release.sh <version>' |
|
|
6 |
echo 'example: ./release.sh 0.3.2' |
|
|
7 |
exit 1 |
|
|
8 |
fi |
|
|
9 |
|
|
|
10 |
version=$1 |
|
|
11 |
export RELEASE_VERSION=$version |
|
|
12 |
|
|
|
13 |
read -rsp "Enter GitHub access token for Changelog generation: " github_token |
|
|
14 |
echo |
|
|
15 |
echo "Release version: $version" |
|
|
16 |
sed -i '' "s/^__version__ .*/__version__ = \"$version\"/g" deidentify/__init__.py |
|
|
17 |
|
|
|
18 |
# Create new tag |
|
|
19 |
git commit -a -m "Bump version to $version" |
|
|
20 |
git tag -a "v$version" -m "v$version" |
|
|
21 |
git push --follow-tags |
|
|
22 |
|
|
|
23 |
make publish |
|
|
24 |
|
|
|
25 |
github_changelog_generator --exclude-tags-regex "^model.*" -u nedap -p deidentify -t "$github_token" |
|
|
26 |
git add CHANGELOG.md |
|
|
27 |
git commit -m "Update CHANGELOG.md" |
|
|
28 |
git push |
|
|
29 |
|
|
|
30 |
echo "Please create a new release and add the contents of the corresponding changelog section." |
|
|
31 |
echo "Visit: https://github.com/nedap/deidentify/releases/edit/v$version" |