message: Update peer dependecies on projects
diff: @@ -46,8 +46,7 @@ done
  cd "$REPO_DIR"
  -if [[ (-z "$TOKEN") || (-z "$JSAPI_PR_NUMBER") || (-z "$VERSION") ]]
  - then
  +if [[ (-z "$TOKEN") || (-z "$JSAPI_PR_NUMBER") || (-z "$VERSION") ]] then
  echo "Each of 'branch name' (-b) and 'commitish' (-c), token (-t) and jsapi pr number (-p) have to be set. See -help."
  exit 1;
  fi
  @@ -68,6 +67,15 @@ for i in $(find . ! -path "*/node_modules/*" -name "package-lock.json" | xargs g
  ( cd $directory ; npm i --ignore-scripts @alfresco/js-api@$VERSION)
  done
  +for i in $(find . ! -path "*/node_modules/*" -name "package.json" | xargs grep -l 'js-api'); do
  + directory=$(dirname $i)
  + echo $directory
  + if jq -e 'has("peerDependencies")' $directory/package.json > /dev/null; then
  + tmp=$(mktemp)
  + jq --arg JS_VERSION "$JS_VERSION" '.peerDependencies["@alfresco/js-api"] = $JS_VERSION' $directory/package.json > "$tmp" && mv "$tmp" $directory/package.json
  + fi
  +done
  +
  git add .
  git commit -n -m "[auto-commit] Update JS-API to $JS_VERSION for branch: $BRANCH_TO_CREATE originated from JS-API PR: $JSAPI_PR_NUMBER"
  git push origin $BRANCH_TO_CREATE
  