We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de5ae86 commit 81d6247Copy full SHA for 81d6247
medcat-v2/.release/prepare_patch_release.sh
@@ -55,7 +55,14 @@ VERSION_PATCH="$(echo "$VERSION" | sed -E 's/^[0-9]+\.[0-9]+\.([0-9]+).*/\1/')"
55
RELEASE_BRANCH="medcat/v$VERSION_MAJOR_MINOR"
56
57
# some prerequisites
58
-[[ "$VERSION_PATCH" == "0" ]] && error_exit "Patch version must not be 0."
+if [[ "$VERSION_PATCH" == "$VERSION_PATCH_AND_PRERELEASE" ]]; then
59
+ if [[ "$VERSION_PATCH" == "0" ]]; then
60
+ # look for any prerelease tags on this major.minor
61
+ if ! git tag -l "medcat/v${VERSION_MAJOR_MINOR}.0[a-z]*" | grep -q .; then
62
+ error_exit "Patch version must not be 0 unless a prerelease (alpha/beta/rc) already exists."
63
+ fi
64
65
+fi
66
67
run_or_echo git fetch origin
68
0 commit comments