From 0e41ea8d6382aba6c3fe002a4df00402eb069774 Mon Sep 17 00:00:00 2001 From: Llewellyn Falco Date: Tue, 31 Oct 2023 10:36:25 -0600 Subject: [PATCH] . e created script for setting the npm version without the 'v' See #150 Co-Authored-By: Clare Macrae --- updateVersion.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 updateVersion.sh diff --git a/updateVersion.sh b/updateVersion.sh new file mode 100755 index 00000000..009db373 --- /dev/null +++ b/updateVersion.sh @@ -0,0 +1,9 @@ +#!/bin/bash -e + +version_with_v="$1" +version=$(echo "$version_with_v" | sed -e s/v//) +TEMP_FILE=$(mktemp) +jq ".version |= \"$version\"" package.json > "$TEMP_FILE" || exit 1 +mv "$TEMP_FILE" package.json + +echo "Setting npm version in package.json to: $version "