diff --git a/scripts/validateRelease.sh b/scripts/validateRelease.sh index 1d40bd28fa..41652c3384 100755 --- a/scripts/validateRelease.sh +++ b/scripts/validateRelease.sh @@ -3,11 +3,12 @@ # explicit declaration that this script needs a $TAG variable passed in e.g TAG=1.2.3 ./script.sh TAG=$TAG TAG_SYNTAX='^[0-9]+\.[0-9]+\.[0-9]+(-.+)*$' + # get version found in lerna.json. This is the source of truth PACKAGE_VERSION=$(cat lerna.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') # get names of packages being managed by lerna -PACKAGES=$(yarn lerna --loglevel=silent ls | awk -F ' ' '{print $1}') +PACKAGES=$(lerna --loglevel=silent ls | awk -F ' ' '{print $1}') # validate tag has format x.y.z if [[ "$(echo $TAG | grep -E $TAG_SYNTAX)" == "" ]]; then @@ -23,7 +24,7 @@ fi # validate that all packages have the same version found in lerna.json for package in $PACKAGES; do - version=$(yarn lerna --loglevel=silent ls -l | grep $package | awk -F ' ' '{print $2}' | cut -c2-) + version=$(lerna --loglevel=silent ls -l | grep $package | awk -F ' ' '{print $2}' | cut -c2-) if [[ $version =~ $PACKAGE_VERSION ]]; then echo "package $package has version $version" else