mirror of
https://github.com/harness/drone.git
synced 2025-05-07 04:51:44 +08:00
Merge pull request #845 from shawnzhu/npm
publish npm package if not exist on registry #799
This commit is contained in:
commit
44c5ca2b55
@ -22,7 +22,7 @@ EOF
|
|||||||
const CmdPublish = `
|
const CmdPublish = `
|
||||||
_NPM_PACKAGE_NAME=$(cd %s && npm list | head -n 1 | cut -d ' ' -f1)
|
_NPM_PACKAGE_NAME=$(cd %s && npm list | head -n 1 | cut -d ' ' -f1)
|
||||||
_NPM_PACKAGE_TAG="%s"
|
_NPM_PACKAGE_TAG="%s"
|
||||||
if [ -z "$(npm info ${_NPM_PACKAGE_NAME})" ]
|
if [ -z "$(npm info ${_NPM_PACKAGE_NAME} 2> /dev/null)" ]
|
||||||
then
|
then
|
||||||
npm publish %s
|
npm publish %s
|
||||||
[ -n ${_NPM_PACKAGE_TAG} ] && npm tag ${_NPM_PACKAGE_NAME} ${_NPM_PACKAGE_TAG}
|
[ -n ${_NPM_PACKAGE_TAG} ] && npm tag ${_NPM_PACKAGE_NAME} ${_NPM_PACKAGE_TAG}
|
||||||
|
Loading…
Reference in New Issue
Block a user