Extract getcurrent version

This commit is contained in:
Adria Navarro 2023-07-05 14:11:32 +02:00
parent d77d9dbda9
commit 5a8d575602
2 changed files with 8 additions and 5 deletions

7
scripts/getCurrentVersion.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
version=$(cat lerna.json \
| grep version \
| head -1 \
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
| sed 's/[",]//g')
echo $version

View File

@ -1,9 +1,5 @@
#!/bin/bash
version=$(cat lerna.json \
| grep version \
| head -1 \
| awk -F: '{gsub(/"/,"",$2);gsub(/[[:space:]]*/,"",$2); print $2}' \
| sed 's/[",]//g')
version=$(./scripts/getCurrentVersion.sh)
echo "Setting version $version"
yarn lerna exec "yarn version --no-git-tag-version --new-version=$version"
echo "Updating dependencies"