From a199955b2d086a8997a6d911293c953c6e488c99 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sun, 28 Nov 2021 19:38:19 +0100 Subject: [PATCH] [ci skip] Add local script to push release --- scripts/push-release.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/push-release.sh diff --git a/scripts/push-release.sh b/scripts/push-release.sh new file mode 100755 index 0000000..03c7b88 --- /dev/null +++ b/scripts/push-release.sh @@ -0,0 +1,23 @@ +#!/bin/sh +VERSION=$1 +if [[ -z $VERSION ]]; then + echo "Version required" + exit +fi +if !(git checkout master && git tag -as "$VERSION" -m "Release"); then + echo "Error while tagging release" + exit +fi +if !(git push && git push github); then + echo "Error while pushing master" + exit +fi +if !(git push --tags && git push --tags github); then + echo "Error while pushing tags" + exit +fi +if !(git checkout stable && git merge master && git push github); then + echo "Error while pushing stable" + exit +fi +git checkout master