From 78ea6684871a0b147aba22bcce497f2ae92b38d6 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Thu, 6 Apr 2023 17:56:25 +0200 Subject: [PATCH] Build twice to avoid having dirty working tree Makes debugging build issues much more fun --- scripts/release.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/release.sh b/scripts/release.sh index 669e441..b338c40 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -186,6 +186,14 @@ then exit 1 fi +# Do not update setup.cfg +# if the build fails anyways +if ! python -m build +then + echo "Error: build failed" + exit 1 +fi + echo "[*] updating version in setup.cfg ..." # can safely be ran multiple times sed -i "s/^version =.*/version = ${tag_name:1}/" setup.cfg @@ -193,6 +201,7 @@ sed -i "s/^version =.*/version = ${tag_name:1}/" setup.cfg echo "[*] wiping old dist ..." [[ -d dist ]] && rm -rf dist +# Try build again after setup.cfg update if ! python -m build then echo "Error: build failed"