From 61336dfbc833c96ddce88be5082b82a30527ee73 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Wed, 19 Oct 2022 16:01:49 +0800 Subject: [PATCH] fix: handle versioning when no `next-*.ts` found (#2202) --- packages/schemas/update-next.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schemas/update-next.sh b/packages/schemas/update-next.sh index 95961d5c1..edf0c2c71 100755 --- a/packages/schemas/update-next.sh +++ b/packages/schemas/update-next.sh @@ -3,5 +3,7 @@ CURRENT_VERSION=$(node -p "require('./package.json').version.replaceAll('-', '_' cd alterations for x in next-*.ts; - do mv $x $CURRENT_VERSION$(echo ${x#next}); +do + [ -e "$x" ] || continue; # Skip when no file found (will still loop $x with "next-*.ts") + mv $x $CURRENT_VERSION$(echo ${x#next}); done