Skip to content

Commit

Permalink
. e created script for setting the npm version without the 'v'
Browse files Browse the repository at this point in the history
See  #150

Co-Authored-By: Clare Macrae <[email protected]>
  • Loading branch information
isidore and claremacrae committed Oct 31, 2023
1 parent 9260657 commit 0e41ea8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions updateVersion.sh
Original file line number Diff line number Diff line change
@@ -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 "

0 comments on commit 0e41ea8

Please sign in to comment.