chore(is-clean.sh): also allow releases on test branch
This commit is contained in:
parent
bfe9bfda0a
commit
0567f438f6
12
is-clean.sh
12
is-clean.sh
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>
|
||||
# SPDX-FileCopyrightText: 2022-2023 Sarah Vaupel <sarah.vaupel@uniworx.de>, Gregor Kleen <gregor.kleen@ifi.lmu.de>
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
@ -13,15 +13,17 @@ if [ -n "$(git status --porcelain)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then
|
||||
echo "Not on master" >&2
|
||||
branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
|
||||
if [ $branch != "master" && $branch != "test" ]; then
|
||||
echo "Not on master or test" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ourHash=$(git rev-parse HEAD)
|
||||
theirHash=$(git ls-remote origin -h refs/heads/master | awk '{ print $1; }')
|
||||
theirHash=$(git ls-remote origin -h refs/heads/$branch | awk '{ print $1; }')
|
||||
|
||||
if [ "$theirHash" != "$ourHash" ]; then
|
||||
echo "Local HEAD is not up to date with remote master" >&2
|
||||
echo "Local HEAD is not up to date with remote $branch" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user