From 83dafa149c50f4ee45e5e5b49f553423dc2b96ef Mon Sep 17 00:00:00 2001 From: himself65 Date: Tue, 25 Apr 2023 18:59:37 -0500 Subject: [PATCH] build: add `set-version.sh` --- scripts/set-version.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 scripts/set-version.sh diff --git a/scripts/set-version.sh b/scripts/set-version.sh new file mode 100755 index 0000000000..bf421bb821 --- /dev/null +++ b/scripts/set-version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +for DIR in $(yarn workspaces list --json | jq -r '.location'); do + if [ -f "$DIR/package.json" ]; then + echo "Setting version for $DIR" + jq ".version = \"$1\"" "$DIR"/package.json > tmp.json && mv tmp.json "$DIR"/package.json + fi +done