build-python: Discard local changes before checking out a new revision

Even if we don't patch cpython-mingw any longer, we still run
autoreconf on it (and libffi), which can cause changes to
committed files. If trying to check out a different version of
the source, this would fail unless the local changes have been
discarded.
This commit is contained in:
Martin Storsjö committed 2021-11-16 12:37:59 +02:00
1 parent fefa34fd04
commit 7e7344281d
1 file changed
+2
+2
View File
@@ -64,6 +64,7 @@ fi
if [ -n "$SYNC" ] || [ -n "$CHECKOUT_LIBFFI" ]; then
cd libffi
[ -z "$SYNC" ] || git fetch
git reset --hard
git checkout $LIBFFI_VERSION
autoreconf -vfi
cd ..
@@ -117,6 +118,7 @@ fi
if [ -n "$SYNC" ] || [ -n "$CHECKOUT_PYTHON" ]; then
cd cpython-mingw
[ -z "$SYNC" ] || git fetch
git reset --hard
git checkout $PYTHON_VERSION_MINGW
autoreconf -vfi
cd ..