Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add special npmrc write/delete in local directory for msal-angular #6361

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions .pipelines/custom-templates/publish-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ jobs:
# Write NPM authToken
- bash: echo $NPM_TOKEN > .npmrc
displayName: Write npm authToken
condition: not(eq('${{ parameters.libName }}', 'msal-angular'))
env:
NPM_TOKEN: $(MSALJSNPMTOKEN)
# Write NPM authToken (Angular only)
- bash: echo $NPM_TOKEN > .npmrc
displayName: Write npm authToken
workingDirectory: "${{ parameters.path }}/${{ parameters.libName }}"
condition: eq('${{ parameters.libName }}', 'msal-angular')
env:
NPM_TOKEN: $(MSALJSNPMTOKEN)

Expand Down Expand Up @@ -109,8 +117,15 @@ jobs:
# Remove .npmrc file
- task: DeleteFiles@1
displayName: Remove .npmrc file
condition: not(eq('${{ parameters.libName }}', 'msal-angular'))
inputs:
Contents: /.npmrc
# Remove .npmrc file (Angular only)
- task: DeleteFiles@1
displayName: Remove .npmrc file
condition: eq('${{ parameters.libName }}', 'msal-angular')
inputs:
Contents: ${{ parameters.path }}/${{ parameters.libName }}/.npmrc

# Install Release Scripts dependencies
- task: Npm@1
Expand Down