File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ if [[ "$HELP" == "--help" || "$HELP" == "-h" ]]; then
14
14
echo " " "
15
15
Run this script on either '$MAIN_BRANCH ' or '${RELEASE_PREFIX} X.X' branch.
16
16
17
- For minor releases :
17
+ For creating a new release :
18
18
On '$MAIN_BRANCH ' branch, it will create a new release branch '${RELEASE_PREFIX} X.X' and bump the minor version on '$MAIN_BRANCH '.
19
19
20
- For patch or prereleases:
21
- On '${RELEASE_PREFIX} X.X' branch, it asks for a type (patch or prerelease) and creates a tag.
20
+ For finalizing a minor or patch releases or prereleases:
21
+ On '${RELEASE_PREFIX} X.X' branch, it asks for a type (minor/ patch/ prerelease) and creates a tag.
22
22
" " "
23
23
exit 0
24
24
fi
71
71
if [[ $BRANCH =~ $RELEASE_REGEX ]]; then
72
72
# Determine which release type
73
73
TYPE=$1
74
- if [[ ! " patch prerelease " =~ " $TYPE " ]]; then
75
- echo " Usage: $0 <patch|prerelease>"
74
+ if [[ ! " minor patch prerelease " =~ " $TYPE " ]]; then
75
+ echo " Usage: $0 <minor| patch|prerelease>"
76
76
echo " Run '--help' for more information."
77
77
exit 1
78
78
fi
79
79
80
+ # Check if minor release then check if patch version is 0 and is preview
81
+ if [[ " $TYPE " == " minor" ]]; then
82
+ if [[ " $PATCH " != " 0" || " $VERSION " != * " $PRE_ID_PREVIEW " * ]]; then
83
+ echo " Minor release is only allowed if the current version is 'X.X.0-$PRE_ID_PREVIEW .X'."
84
+ exit 1
85
+ fi
86
+ fi
87
+
80
88
echo " Finalize release [BRANCH=$BRANCH , VERSION=$VERSION , TYPE=$TYPE ]"
81
89
82
90
# Fetch all remote tags
You can’t perform that action at this time.
0 commit comments