File tree Expand file tree Collapse file tree 3 files changed +51
-21
lines changed Expand file tree Collapse file tree 3 files changed +51
-21
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+ set -e
3
+
4
+ CURRENT_BRANCH=$( git rev-parse --abbrev-ref HEAD)
5
+ if [[ $CURRENT_BRANCH != release/* ]]; then
6
+ echo " You have to be on release branch to finish the release"
7
+ exit 1
8
+ fi
9
+
10
+ NEW_VERSION=$( poetry version --short)
11
+
12
+ pytest
13
+ mypy
14
+
15
+ git commit -a -m " Version v$NEW_VERSION "
16
+ git tag " v$NEW_VERSION "
17
+ git flow release finish
18
+
19
+
20
+ confirm () {
21
+ QUESTION=$1
22
+ read -rp " $QUESTION (y/n): " RESPONSE
23
+ case $RESPONSE in
24
+ [Yy]* ) return 0;;
25
+ [Nn]* ) return 1;;
26
+ * ) echo " Please answer y or n." && confirm " $QUESTION " ;;
27
+ esac
28
+ }
29
+
30
+ if confirm " Do you want to push the changes?" ; then
31
+ git push
32
+ git push --tags
33
+ else
34
+ echo " To publish:"
35
+ echo " git push && git push --tags"
36
+ fi
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+ set -e
3
+
4
+ BUMP_RULE=$1
5
+ if [ -z " $BUMP_RULE " ]; then
6
+ echo " Please specify bump rule: major, minor or patch"
7
+ exit 1
8
+ fi
9
+
10
+ NEXT_VERSION=$( poetry version --dry-run --short " $BUMP_RULE " )
11
+
12
+ git flow release start " v$NEXT_VERSION "
13
+ poetry version " $BUMP_RULE "
14
+
15
+ echo " Type release-finish.sh to make the release"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments