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
|
exit 1
|
||||||
fi
|
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 ..."
|
echo "[*] updating version in setup.cfg ..."
|
||||||
# can safely be ran multiple times
|
# can safely be ran multiple times
|
||||||
sed -i "s/^version =.*/version = ${tag_name:1}/" setup.cfg
|
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 ..."
|
echo "[*] wiping old dist ..."
|
||||||
[[ -d dist ]] && rm -rf dist
|
[[ -d dist ]] && rm -rf dist
|
||||||
|
|
||||||
|
# Try build again after setup.cfg update
|
||||||
if ! python -m build
|
if ! python -m build
|
||||||
then
|
then
|
||||||
echo "Error: build failed"
|
echo "Error: build failed"
|
||||||
|
|
Loading…
Reference in a new issue