Skip to content

Commit

Permalink
Add auth_method option for NPM deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Carla authored and iriberri committed Jul 27, 2018
1 parent 3df474b commit 9d4499d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/dpl/provider/npm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def package_registry

def npmrc_file_content
log "NPM version: #{npm_version}"
if npm_version =~ /^1/

if npm_version =~ /^1/ || option(:auth_method) == "auth"
"_auth = ${NPM_API_KEY}\nemail = #{option(:email)}"
else
"//#{package_registry}/:_authToken=${NPM_API_KEY}"
Expand Down

0 comments on commit 9d4499d

Please sign in to comment.