From 74bb91518006bb5ae6942e64ed4cd2e50fdf9e98 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 27 Apr 2023 02:52:08 +0000 Subject: [PATCH] mkgitrel.pre: check for existing tags and release directory --- mkgitrel.pre | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mkgitrel.pre b/mkgitrel.pre index 555351a320a..6e04b527ba0 100755 --- a/mkgitrel.pre +++ b/mkgitrel.pre @@ -68,6 +68,23 @@ for d in sources/v$rel logs/v$rel; do fi done && +for d in $reldir/$rel; do + if test -d $d; then + echo directory $d already exists, cannot proceed >&2 + success=false + fi +done && + +for d in sources logs scripts incr; do + if git rev-parse --verify -q $d/v$rel >&2; then + echo tag $d/v$rel already exists, it needs to be cleaned up first >&2 + success=false + elif git rev-parse --verify -q public/$d/v$rel >&2; then + echo tag public/$d/v$rel already exists, cannot proceed >&2 + success=false + fi +done && + for f in linux-libre-$rel.check linux-libre-$rel.patck; do if test -f $f; then echo warning: file $f already exists >&2 -- 2.31.1