From b59378adcd3412bf771759cc09b05066fd4d042e Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 9 Dec 2024 20:27:31 -0500 Subject: [PATCH 1/2] ensure we get semver --- Scripts/publish-release.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Scripts/publish-release.sh b/Scripts/publish-release.sh index ecd6f85..3aac67d 100755 --- a/Scripts/publish-release.sh +++ b/Scripts/publish-release.sh @@ -33,6 +33,10 @@ major|minor|patch|prerelease) echo "usage $0 " >&2 exit 1;; *) + if test "$(npx -- semver \"$1\")" != "$1"; then + echo "$1 doesn't look like valid semver." + exit 1 + fi v_new=$1 ;; esac From 7aef3af788f5cfa3044e3623f83d504d1aca85f2 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 9 Dec 2024 20:30:25 -0500 Subject: [PATCH 2/2] shell quoting --- Scripts/publish-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/publish-release.sh b/Scripts/publish-release.sh index 3aac67d..105a0e8 100755 --- a/Scripts/publish-release.sh +++ b/Scripts/publish-release.sh @@ -33,7 +33,7 @@ major|minor|patch|prerelease) echo "usage $0 " >&2 exit 1;; *) - if test "$(npx -- semver \"$1\")" != "$1"; then + if test "$(npx -- semver """$1""")" != "$1"; then echo "$1 doesn't look like valid semver." exit 1 fi