Skip to content

Commit

Permalink
Only update dependencies in test chaincodes (#261)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
  • Loading branch information
mbwhite authored Mar 11, 2021
1 parent 794cb86 commit e5389a4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ci/updatePackageJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e5389a4

Please sign in to comment.