From 754185d3e2e2ab6b9050f3b120779a10f8db69b0 Mon Sep 17 00:00:00 2001 From: Arkat Erol Date: Tue, 10 Mar 2020 16:49:34 +0300 Subject: [PATCH] npm-cli-login added for preview npm publish --- npm/preview-publish.ps1 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/npm/preview-publish.ps1 b/npm/preview-publish.ps1 index 5ca3336c85..415396052c 100644 --- a/npm/preview-publish.ps1 +++ b/npm/preview-publish.ps1 @@ -1,5 +1,9 @@ param( - [string]$Version + [string]$Version, + [string]$User, + [string]$Pass, + [string]$Email, + [string]$Registry ) npm install @@ -11,12 +15,17 @@ if(-Not $Version) { $Version = $NextVersion; } +if(-Not $Registry) { +$Registry = "http://localhost:4873"; +} + $commands = ( + "npm-cli-login -u $User -p $Pass -e $Email -r $Registry" "cd ng-packs\scripts", "npm install", "npm run publish-packages -- --nextVersion $Version --preview", "cd ../../", - "yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish --dist-tag preview --registry http://localhost:4873" + "yarn lerna publish $Version --no-push --yes --no-git-reset --no-commit-hooks --no-git-tag-version --force-publish --dist-tag preview --registry $Registry" ) foreach ($command in $commands) {