diff --git a/packages/lambda/package.json b/packages/lambda/package.json index c5c65859..bfcf847b 100644 --- a/packages/lambda/package.json +++ b/packages/lambda/package.json @@ -1,6 +1,6 @@ { "name": "@serverless-chrome/lambda", - "version": "1.0.0-6", + "version": "1.0.0-7", "description": "Run headless Chrome/Chromium on AWS Lambda", "author": "Marco Lüthy", "keywords": [ diff --git a/packages/serverless-plugin/package.json b/packages/serverless-plugin/package.json index a93884e2..47c2a21d 100644 --- a/packages/serverless-plugin/package.json +++ b/packages/serverless-plugin/package.json @@ -1,6 +1,6 @@ { "name": "serverless-plugin-chrome", - "version": "1.0.0-12", + "version": "1.0.0-7", "description": "A Serverless-framework plugin that takes care of running headless Chrome so that you can move on with getting things done.", "keywords": [ "serverless", @@ -40,7 +40,7 @@ }, "homepage": "https://github.com/adieuadieu/serverless-chrome/tree/master/packages/serverless-plugin", "dependencies": { - "@serverless-chrome/lambda": "1.0.0-6", + "@serverless-chrome/lambda": "1.0.0-7", "fs-p": "2.0.0", "globby": "6.1.0" }, diff --git a/scripts/sync-package-versions.sh b/scripts/sync-package-versions.sh index 82ee1831..1ea80f49 100755 --- a/scripts/sync-package-versions.sh +++ b/scripts/sync-package-versions.sh @@ -29,7 +29,23 @@ for PACKAGE in */package.json; do if [ "$PACKAGE_VERSION" != "$PROJECT_VERSION" ]; then echo "Updating $PACKAGE_NAME version ..." - JSON=$(jq -r ".version |= \"$PROJECT_VERSION\"" package.json) + JSON=$(jq -r \ + ".version |= \"$PROJECT_VERSION\"" \ + package.json + ) + + HAS_LAMBDA_DEPENDENCY=$(echo "$JSON" | \ + jq -r \ + ".dependencies | has(\"@serverless-chrome/lambda\")" + ) + + if [ "$HAS_LAMBDA_DEPENDENCY" = "true" ]; then + JSON=$(echo "$JSON" | \ + jq -r \ + ".dependencies.\"@serverless-chrome/lambda\" |= \"$PROJECT_VERSION\"" + ) + fi + echo "$JSON" > package.json else @@ -39,3 +55,4 @@ for PACKAGE in */package.json; do cd ../ done +# @TODO: update integration-test and example dependencies, too