From 45a68ba26d8a8a25901b2364349d6884cb58b15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Thu, 29 Dec 2022 16:45:13 +0100 Subject: [PATCH] Work on release process. --- .github/workflows/build_docker.yml | 3 ++- .github/workflows/build_snap.yml | 3 ++- scripts/release.sh | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index fad2bf2..90dcd98 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -5,7 +5,8 @@ on: branches: - 'master' tags: - - '*.*.*' + - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+RC[0-9]+' jobs: docker: diff --git a/.github/workflows/build_snap.yml b/.github/workflows/build_snap.yml index 5d663fc..525ef27 100644 --- a/.github/workflows/build_snap.yml +++ b/.github/workflows/build_snap.yml @@ -5,7 +5,8 @@ on: branches: - 'master' tags: - - '*.*.*' + - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+RC[0-9]+' jobs: build-and-release: diff --git a/scripts/release.sh b/scripts/release.sh index a2a4a1e..f93ef1e 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -64,6 +64,12 @@ fi RC_VERSION="$MAJOR.$MINOR.$PATCH-RC$RC" +if [ git tag "$RC_VERSION" | grep -q "$RC_VERSION" ] +then + echo "Oups! The tag $RC_VERSION already exists! Please remove it!" + exit 0 +fi + MESSAGE="Version $RC_VERSION $(date +'%Y-%m-%d')" echo