From e5389a4ce6d6dfd5b4631ae924fd691410c87022 Mon Sep 17 00:00:00 2001 From: Matthew B White Date: Thu, 11 Mar 2021 08:34:11 +0000 Subject: [PATCH] Only update dependencies in test chaincodes (#261) Signed-off-by: Matthew B White --- ci/updatePackageJson.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/updatePackageJson.js b/ci/updatePackageJson.js index dce3fbee..8b32ae08 100644 --- a/ci/updatePackageJson.js +++ b/ci/updatePackageJson.js @@ -2,7 +2,13 @@ const fs = require('fs'); let filename = process.argv[2]; let input = JSON.parse(fs.readFileSync(filename)); let ver = process.env.RELEASE_VERSION; -input.version = ver; + +// don't want to update the main package.json version for the 'fake' test contracts +// only the dependencies +if (!filename.match(/\/test\//g)){ + input.version = ver; +} + if (input.dependencies) { if (input.dependencies['fabric-contract-api']) input.dependencies['fabric-contract-api'] = ver; if (input.dependencies['fabric-ledger']) input.dependencies['fabric-ledger'] = ver;