build: add option to allow uploading dirty nightly builds
This commit is contained in:
parent
bfba9ab810
commit
15e27a6104
1 changed files with 13 additions and 10 deletions
|
@ -6,6 +6,7 @@ for arg in "$@"; do
|
||||||
--no-github) NO_GITHUB=1 ;;
|
--no-github) NO_GITHUB=1 ;;
|
||||||
--no-codeberg) NO_CODEBERG=1 ;;
|
--no-codeberg) NO_CODEBERG=1 ;;
|
||||||
--no-flowcontrol) NO_FLOWCONTROL=1 ;;
|
--no-flowcontrol) NO_FLOWCONTROL=1 ;;
|
||||||
|
--allow-dirty) ALLOW_DIRTY=1 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -33,18 +34,20 @@ fi
|
||||||
|
|
||||||
DIFF="$(git diff --stat --patch HEAD)"
|
DIFF="$(git diff --stat --patch HEAD)"
|
||||||
|
|
||||||
if [ -n "$DIFF" ]; then
|
if [ -z "$ALLOW_DIRTY" ]; then
|
||||||
echo there are outstanding changes:
|
if [ -n "$DIFF" ]; then
|
||||||
echo "$DIFF"
|
echo there are outstanding changes:
|
||||||
exit 1
|
echo "$DIFF"
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
UNPUSHED="$(git log --pretty=oneline '@{u}...')"
|
UNPUSHED="$(git log --pretty=oneline '@{u}...')"
|
||||||
|
|
||||||
if [ -n "$UNPUSHED" ]; then
|
if [ -n "$UNPUSHED" ]; then
|
||||||
echo there are unpushed commits:
|
echo there are unpushed commits:
|
||||||
echo "$UNPUSHED"
|
echo "$UNPUSHED"
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get latest version tag
|
# get latest version tag
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue