diff --git a/Makefile b/Makefile index 404fa62..9ad49a5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL:=/bin/bash export bin=@pact-foundation/pact-cli -export pkg_version=$(shell cat package.json | jq -r .version) +export pkg_version?=$(shell cat package.json | jq -r .version) supported_platforms = "linux-x64" "linux-arm64" "darwin-x64" "darwin-arm64" "windows-x64" export STANDALONE_VERSION=$(shell grep "PACT_STANDALONE_VERSION = '" standalone/install.ts | grep -E -o "'(.*)'" | cut -d"'" -f2) diff --git a/package-lock.json b/package-lock.json index ab6d7b9..b0c3281 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "16.0.1", "cpu": [ "x64", - "ia32", "arm64" ], "license": "MIT", @@ -82,6 +81,13 @@ }, "engines": { "node": ">=16" + }, + "optionalDependencies": { + "@pact-foundation/pact-cli-darwin-arm64": "16.0.1", + "@pact-foundation/pact-cli-darwin-x64": "16.0.1", + "@pact-foundation/pact-cli-linux-arm64": "16.0.1", + "@pact-foundation/pact-cli-linux-x64": "16.0.1", + "@pact-foundation/pact-cli-windows-x64": "16.0.1" } }, "node_modules/@babel/code-frame": { @@ -337,6 +343,66 @@ "node": ">= 8" } }, + "node_modules/@pact-foundation/pact-cli-darwin-arm64": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-cli-darwin-arm64/-/pact-cli-darwin-arm64-16.0.1.tgz", + "integrity": "sha512-DawP+geFtaaA3T3s4wuupBFzXWASrxOFyJmeO2vpUVcqVcbLB/fJkIkh+vGAv8a+mliRklVas43svbfEBQzNEA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@pact-foundation/pact-cli-darwin-x64": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-cli-darwin-x64/-/pact-cli-darwin-x64-16.0.1.tgz", + "integrity": "sha512-H+6Fup0InYoBOIBVQcKmcRyrrvs1BQEst8nVxathd6mG/pi4IwognCnVzKPvl0DA5KPzyEnqWTmqbYod5Y/+bQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@pact-foundation/pact-cli-linux-arm64": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-cli-linux-arm64/-/pact-cli-linux-arm64-16.0.1.tgz", + "integrity": "sha512-aPipFeMCBeF5OTd7et7l9B43jTdMOtQctlUSgXyRUMjn3quiWNBxfM1RGbFzcViQvt2KW7hNZtReRQKAlgu/FA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@pact-foundation/pact-cli-linux-x64": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-cli-linux-x64/-/pact-cli-linux-x64-16.0.1.tgz", + "integrity": "sha512-vvsBW+xKoN5ybpAG4wEUZBO9zqu+coBF0+Y75tdlgXrErrxUY6ERra8GgHQup0rd4LYzInAfiZgiJMPGzeG6+A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@pact-foundation/pact-cli-windows-x64": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@pact-foundation/pact-cli-windows-x64/-/pact-cli-windows-x64-16.0.1.tgz", + "integrity": "sha512-aAS931rE67I6MLXAYqw0UHNW7fEgqgfmfaY3aoZQi8PLbBtGqDtWLAaJg1W9Q1NtmMvfSRHOBwJRKR+QqVkP0Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@pact-foundation/pact-js-prettier-config": { "version": "1.0.0", "dev": true, diff --git a/package.json b/package.json index 93f1142..8a4b24e 100644 --- a/package.json +++ b/package.json @@ -52,11 +52,11 @@ "access": "public" }, "optionalDependencies": { - "@pact-foundation/pact-cli-darwin-arm64": "16.0.0", - "@pact-foundation/pact-cli-darwin-x64": "16.0.0", - "@pact-foundation/pact-cli-windows-x64": "16.0.0", - "@pact-foundation/pact-cli-linux-x64": "16.0.0", - "@pact-foundation/pact-cli-linux-arm64": "16.0.0" + "@pact-foundation/pact-cli-darwin-arm64": "16.0.1", + "@pact-foundation/pact-cli-darwin-x64": "16.0.1", + "@pact-foundation/pact-cli-windows-x64": "16.0.1", + "@pact-foundation/pact-cli-linux-x64": "16.0.1", + "@pact-foundation/pact-cli-linux-arm64": "16.0.1" }, "dependencies": { "chalk": "4.1.2", diff --git a/script/ci/build-and-test.sh b/script/ci/build-and-test.sh index 9e866e6..0b4ff6f 100755 --- a/script/ci/build-and-test.sh +++ b/script/ci/build-and-test.sh @@ -21,10 +21,12 @@ node --version npm --version npm ci -# Link os/arch specific npm package, for running os/arch system -make link # Update main package.json optional dependencies versions, with those created earlier make update_opt_deps +# update lockfile post buildling updated opt deps +npm i +# Link os/arch specific npm package, for running os/arch system +make link npm run format:check npm run lint npm run build diff --git a/script/ci/lib/publish.sh b/script/ci/lib/publish.sh index a1819ba..ca2b872 100755 --- a/script/ci/lib/publish.sh +++ b/script/ci/lib/publish.sh @@ -16,16 +16,12 @@ if [[ ${DRY_RUN:-} == 'true' ]]; then echo "publishing in dry run mode" # Dry-run Publish os/arch specific npm packages make dry_run - # Update main package.json optional dependencies versions, with those created earlier - make update_opt_deps npm publish --access-public --dry-run else echo "--> Preparing npmrc file" "$SCRIPT_DIR"/create_npmrc_file.sh # Publish os/arch specific npm packages make publish - # Update main package.json optional dependencies versions, with those created earlier - make update_opt_deps npm publish --access public --tag latest fi echo " done!" diff --git a/script/ci/release.sh b/script/ci/release.sh index 491ae2b..fe12b0e 100755 --- a/script/ci/release.sh +++ b/script/ci/release.sh @@ -41,6 +41,7 @@ if [ ! -z "${ONLY_DOWNLOAD_PACT_FOR_WINDOWS:-}" ]; then exit 1 fi +export pkg_version=$NEXT_VERSION "$SCRIPT_DIR"/download-standalone-and-test.sh if [[ ${DRY_RUN:-} == 'true' ]]; then