Skip to content

Commit

Permalink
fix: push npm tag without a 'v' in tag string
Browse files Browse the repository at this point in the history
  • Loading branch information
DaRaFF committed Aug 31, 2019
1 parent cc04f56 commit 7512776
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/shell/sh-npm-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ module.exports = function (dep) {
// const releaseTag = exec(`echo release-$(echo ${argv.baseTag} | cut -d '.' -f1 -f2).x`)
const npmPackageName = exec(`echo $(node -e 'console.log(require("./package.json").name)')`).stdout
const isNpmPublishSet = exec(`echo $(cat package.json | jq '.release.npmPublish')`).stdout
const baseTag = argv.baseTag.replace('v','')
if (isNpmPublishSet !== 'false') {
logYellow(`Add tag ${argv.releaseBranchName} to npm package version ${npmPackageName}@${argv.baseTag}`)
exec(`npm dist-tag add ${npmPackageName}@${argv.baseTag} ${argv.releaseBranchName} --//registry.npmjs.org/:_authToken=${argv.npmToken}`, argv.dryRun)
logYellow(`Add tag ${argv.releaseBranchName} to npm package version ${npmPackageName}@${baseTag}`)
exec(`npm dist-tag add ${npmPackageName}@${baseTag} ${argv.releaseBranchName} --//registry.npmjs.org/:_authToken=${argv.npmToken}`, argv.dryRun)
logYellow('dist-tag to npm published')
return
}
Expand Down

0 comments on commit 7512776

Please sign in to comment.