mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
correct npm publish logic
This commit is contained in:
parent
d77b3209b0
commit
0ee9b163b9
1 changed files with 5 additions and 5 deletions
|
@ -51,11 +51,6 @@ func (n *NPM) Write(f *buildfile.Buildfile) {
|
|||
|
||||
npmPublishCmd := "npm publish %s"
|
||||
|
||||
// Setup custom npm registry
|
||||
if n.Registry != "" {
|
||||
f.WriteCmdSilent(fmt.Sprintf("npm config set registry %s", n.Registry))
|
||||
}
|
||||
|
||||
if n.Tag != "" {
|
||||
npmPublishCmd += fmt.Sprintf(" --tag %s", n.Tag)
|
||||
}
|
||||
|
@ -69,5 +64,10 @@ func (n *NPM) Write(f *buildfile.Buildfile) {
|
|||
// Login to registry
|
||||
f.WriteCmdSilent(fmt.Sprintf(npmLoginCmd, n.Username, n.Password, n.Email))
|
||||
|
||||
// Setup custom npm registry
|
||||
if n.Registry != "" {
|
||||
f.WriteCmdSilent(fmt.Sprintf("npm config set registry %s", n.Registry))
|
||||
}
|
||||
|
||||
f.WriteCmd(fmt.Sprintf(npmPublishCmd, n.Folder))
|
||||
}
|
Loading…
Reference in a new issue