From 15e27a6104b6a54e2da8577cb50dfb458999c290 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 23 Sep 2025 13:36:04 +0200 Subject: [PATCH] build: add option to allow uploading dirty nightly builds --- contrib/make_nightly_build | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/contrib/make_nightly_build b/contrib/make_nightly_build index eda0a1e..05a4850 100755 --- a/contrib/make_nightly_build +++ b/contrib/make_nightly_build @@ -6,6 +6,7 @@ for arg in "$@"; do --no-github) NO_GITHUB=1 ;; --no-codeberg) NO_CODEBERG=1 ;; --no-flowcontrol) NO_FLOWCONTROL=1 ;; + --allow-dirty) ALLOW_DIRTY=1 ;; esac done @@ -33,18 +34,20 @@ fi DIFF="$(git diff --stat --patch HEAD)" -if [ -n "$DIFF" ]; then - echo there are outstanding changes: - echo "$DIFF" - exit 1 -fi +if [ -z "$ALLOW_DIRTY" ]; then + if [ -n "$DIFF" ]; then + echo there are outstanding changes: + echo "$DIFF" + exit 1 + fi -UNPUSHED="$(git log --pretty=oneline '@{u}...')" + UNPUSHED="$(git log --pretty=oneline '@{u}...')" -if [ -n "$UNPUSHED" ]; then - echo there are unpushed commits: - echo "$UNPUSHED" - exit 1 + if [ -n "$UNPUSHED" ]; then + echo there are unpushed commits: + echo "$UNPUSHED" + exit 1 + fi fi # get latest version tag