Build twice to avoid having dirty working tree
Makes debugging build issues much more fun
This commit is contained in:
parent
146f2214e0
commit
78ea668487
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue