mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
update npm login method
This commit is contained in:
parent
d0628bbe7b
commit
d77b3209b0
2 changed files with 4 additions and 8 deletions
|
@ -6,11 +6,11 @@ import (
|
|||
"github.com/drone/drone/pkg/build/buildfile"
|
||||
)
|
||||
|
||||
// use npm trick instead of running npm adduser that requires stdin
|
||||
var npmLoginCmd = `
|
||||
npm login <<EOF
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
cat <<EOF > ~/.npmrc
|
||||
_auth = $(echo "%s:%s" | tr -d "\r\n" | base64)
|
||||
email = %s
|
||||
EOF
|
||||
`
|
||||
|
||||
|
|
|
@ -59,10 +59,6 @@ func TestNPMPublish(t *testing.T) {
|
|||
t.Fatalf("Can't unmarshal publish script: %s", err)
|
||||
}
|
||||
|
||||
if !strings.Contains(bscr, "npm login") {
|
||||
t.Error("Expect script to contain login command")
|
||||
}
|
||||
|
||||
if !strings.Contains(bscr, "npm publish") {
|
||||
t.Error("Expect script to contain install command")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue