diff options
author | Sverker Eriksson <[email protected]> | 2018-06-28 20:35:55 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-06-29 16:18:49 +0200 |
commit | 8c565d429c1f5e95221b1d805c0ae2e19dd9e02e (patch) | |
tree | 91a1ef8cf3a374eb69c637f5950cce624c98e5f8 /scripts/pre-push | |
parent | d8f9138ce941fbce571a05afaf2453765aa25899 (diff) | |
download | otp-8c565d429c1f5e95221b1d805c0ae2e19dd9e02e.tar.gz otp-8c565d429c1f5e95221b1d805c0ae2e19dd9e02e.tar.bz2 otp-8c565d429c1f5e95221b1d805c0ae2e19dd9e02e.zip |
pre-push: Make easier to add new OTP major releases
by just adding to NEW_RELEASES
Diffstat (limited to 'scripts/pre-push')
-rwxr-xr-x | scripts/pre-push | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/scripts/pre-push b/scripts/pre-push index 945fb3519a..5d4e280d25 100755 --- a/scripts/pre-push +++ b/scripts/pre-push @@ -22,7 +22,9 @@ # <local ref> <local sha1> <remote ref> <remote sha1> # -RELEASES="21 20 19 18 17 r16 r15 r14 r13" +NEW_RELEASES="21 20 19 18 17" +OLD_RELEASES="r16 r15 r14 r13" +RELEASES="$NEW_RELEASES $OLD_RELEASES" # First commit on master, not allowed in other branches MASTER_ONLY=aea2a053e28a11497796879715be29ab0c3cd1a0 @@ -158,8 +160,24 @@ then exit 1 fi ;; - refs/tags/OTP-21.* | refs/tags/OTP-20.* | refs/tags/OTP-19.* | refs/tags/OTP-18.* | refs/tags/OTP-17.*) + refs/tags/OTP-*) tag=${remote_ref#refs/tags/} + REL="UNKNOWN" + for x in $NEW_RELEASES; do + if [ ${tag#OTP-$x.} != $tag ] + then + REL=$x + break + fi + done + if [ $REL = "UNKNOWN" ] + then + echo "$0 says:" + echo "***" + echo "*** Unknown OTP release number in tag '$tag'" + echo "***" + exit 1 + fi if [ "$remote_sha" != $null ] then echo "$0 says:" |