From b1e5eabf074f7420801c9329b63bebb36ada385f Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Wed, 25 Sep 2024 21:05:55 +0200 Subject: [PATCH] fool-proof publish.sh --- publish.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/publish.sh b/publish.sh index ceb4fe4..d74c527 100755 --- a/publish.sh +++ b/publish.sh @@ -2,6 +2,11 @@ version=$1 +if [ -z "$version" ]; then + echo "Version is required" + exit 1 +fi + echo "Publishing $version" sed -i -e "s/\"version\": \".*\"/\"version\": \"$version\"/g" package.json