build: add set-version.sh

This commit is contained in:
himself65
2023-04-25 18:59:37 -05:00
parent 3a25f13734
commit 83dafa149c

8
scripts/set-version.sh Executable file
View File

@@ -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