chore: perform further sanity checks before release
This commit is contained in:
parent
e1b3c46356
commit
96a4e00c0e
17
is-clean.sh
17
is-clean.sh
@ -1,6 +1,21 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if ! ( output=$(git status --porcelain) && [ -z "$output" ] ); then
|
set -e
|
||||||
|
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
echo "Working directory isn't clean" >&2
|
echo "Working directory isn't clean" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then
|
||||||
|
echo "Not on master" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ourHash=$(git rev-parse HEAD)
|
||||||
|
theirHash=$(git ls-remote origin -h refs/heads/master | awk '{ print $1; }')
|
||||||
|
|
||||||
|
if [ "$theirHash" != "$ourHash" ]; then
|
||||||
|
echo "Local HEAD is not up to date with remote master" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user