Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions packages/caliper-publish/artifacts/npm-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,8 @@ ARCH=`uname -m`

if [[ -z "${NPM_REGISTRY}" ]]
then
if [[ -z "${NPM_TOKEN}" ]]
then
echo "NPM_TOKEN must be set when publishing to the public NPM registry."
exit 1
else
# Set the NPM access token we will use to publish.
npm config set registry https://registry.npmjs.org/
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
fi
# Set the public NPM registry as default
npm config set registry https://registry.npmjs.org/
fi

npm publish --access public ${NPM_REGISTRY} ${DRY_RUN} --tag ${TAG}
2 changes: 1 addition & 1 deletion packages/caliper-publish/lib/npmCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports.builder = yargs => {
demand: false,
default: '',
type: 'string',
describe: 'The NPM registry address to use for publishing the packages. Defaults to the public NPM registry which requires NPM_TOKEN to be set.'
describe: 'The NPM registry address to use for publishing the packages. Defaults to the public NPM registry which requires trusted publishing to be configured.'
},
'dry-run': {
alias: 'd',
Expand Down
2 changes: 1 addition & 1 deletion packages/caliper-publish/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ let results = yargs
.demandCommand(1, 1, 'Please specify a command to continue')
.wrap(null)
.strict()
.version(version) // enabling the version command must come before its alias setting, otherwise -v will not work
.alias('version', 'v')
.alias('help', 'h')
.version(version)
.describe('version', 'Show version information')
.describe('help', 'Show usage information')
.argv;
Expand Down
Loading