From 3d5fda3b67f9a261bcfcae8ccede7a3013fb8c36 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 17 Nov 2021 08:42:00 -0500 Subject: [PATCH] mkgitrel.pub: catch .check file created while waiting for .patck removal --- mkgitrel.pub | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mkgitrel.pub b/mkgitrel.pub index 6b7e87acf95..c851c30beaf 100755 --- a/mkgitrel.pub +++ b/mkgitrel.pub @@ -62,11 +62,23 @@ if test -f linux-libre-$rel.check; then continue fi && -while test -f linux-libre-$rel.patck; do +while test -f linux-libre-$rel.patck && test ! -f linux-libre-$rel.check; do echo please verify linux-libre-$rel.patck and move it away to complete the release sleep 30 done && +# Look for .check again, maybe it was created manually while we waited +# for .patck to be removed. In this case, we have to duplicate the +# cleanups that .rel would have already done. +if test -f linux-libre-$rel.check; then + echo linux-libre-$rel.check exists, abandoning this release + git tag -d incr/v$rel logs/v$rel sources/v$rel |& + tee -a linux-libre-$rel.dtags + git worktree remove logs/v$rel + git worktree remove --force sources/v$rel + continue +fi && + ( cd scripts/v$rel && { { git reset --soft -q scripts/$cbr && -- 2.31.1