diff --git a/ci/gitlab-ci/lib/scripts/release.sh b/ci/gitlab-ci/lib/scripts/release.sh index b26bd391ffa..4310a2b4dcf 100644 --- a/ci/gitlab-ci/lib/scripts/release.sh +++ b/ci/gitlab-ci/lib/scripts/release.sh @@ -70,4 +70,11 @@ release_get_package_version() { CI_COMMIT_REF_NAME_ESCAPED=$(echo ${CI_COMMIT_REF_NAME} | sed sI/I-Ig) echo ${CI_COMMIT_TAG:-"nightly-${CI_COMMIT_REF_NAME_ESCAPED}-$(date -d "$CI_COMMIT_TIMESTAMP" '+%Y.%m.%d')-${CI_COMMIT_SHORT_SHA}"} +} + +release_is_patch_level_release() { + # 20[0-9][0-9]\.11\.[1-9]+[0-9] => match tine version e.g. => 2023.11.17 + # *(-.*)*(-pl[0-9]+)(-.*) => match any postfix e.g. -rc1 -test, but require postfix -pl e.g -pl10 + # note the gitlab release rule regex is broader and matches ^20..\.11\..*. It should also be switched to ^20[0-9][0-9]\.11\.[1-9]+[0-9]*(-.*)*$ + [[ "$CI_COMMIT_TAG" =~ =~ ^20[0-9][0-9]\.11\.[1-9]+[0-9]*(-.*)*(-pl[0-9]+)(-.*)*$ ]] } \ No newline at end of file diff --git a/ci/gitlab-ci/lib/scripts/release_packages.sh b/ci/gitlab-ci/lib/scripts/release_packages.sh index deda8e0b56a..9380cbf423a 100644 --- a/ci/gitlab-ci/lib/scripts/release_packages.sh +++ b/ci/gitlab-ci/lib/scripts/release_packages.sh @@ -30,7 +30,10 @@ release_packages_notify_matrix() { matrix_room="${MATRIX_ROOM}" fi - matrix_send_message "${matrix_room}" "We just released the new version ${CODENAME} ${version} 🎉\\nCheck https://www.tine-groupware.de/ and https://github.com/tine-groupware/tine/releases for more information and the downloads.\\nYou can also pull the image from dockerhub: https://hub.docker.com/r/tinegroupware/tine" + if ! release_is_patch_level_release; then + matrix_send_message "${matrix_room}" "We just released the new version ${CODENAME} ${version} 🎉\\nCheck https://www.tine-groupware.de/ and https://github.com/tine-groupware/tine/releases for more information and the downloads.\\nYou can also pull the image from dockerhub: https://hub.docker.com/r/tinegroupware/tine" + fi + fi }