Skip to content

Commit

Permalink
move npmrc to tmpl (#48)
Browse files Browse the repository at this point in the history
Signed-off-by: awjh <[email protected]>
  • Loading branch information
awjh authored Feb 8, 2021
1 parent bc77108 commit 48f1d87
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,12 @@ steps:
clean: true
fetchDepth: 1
- script: npm install
env:
NPMTOKEN: $(NPMTOKEN)
displayName: Install node modules
- script: npm run lint
env:
NPMTOKEN: $(NPMTOKEN)
displayName: Lint files
- script: npm run unit
env:
NPMTOKEN: $(NPMTOKEN)
displayName: Run unit tests
- script: npm run integration
env:
NPMTOKEN: $(NPMTOKEN)
displayName: Run integration tests
- script: ./.azure-pipelines/scripts/version-bump-to-release.sh
condition: and(contains(variables['build.sourceBranch'], 'refs/tags'), succeeded())
Expand All @@ -39,7 +31,7 @@ steps:
GHUSER: $(GHUSER)
GHEMAIL: $(GHEMAIL)
displayName: Check package.json version matches release and bump
- script: npm publish
- script: ./.azure-pipelines/scripts/publish-to-npm.sh
condition: and(contains(variables['build.sourceBranch'], 'refs/tags'), succeeded())
env:
NPMTOKEN: $(NPMTOKEN)
Expand All @@ -49,4 +41,4 @@ steps:
env:
GHUSER: $(GHUSER)
GHEMAIL: $(GHEMAIL)
displayName: Check package.json version matches release and bump
displayName: Bump version to patch release
17 changes: 17 additions & 0 deletions .azure-pipelines/scripts/publish-to-npm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -e

BASEDIR=$(dirname "$0")

cd $BASEDIR # get scripts location

BASEDIR=$(pwd)

cd ../.. # move to where package.json is

mv .npmrc.tmpl .npmrc

npm publish

mv .npmrc .npmrc.tmpl
File renamed without changes.

0 comments on commit 48f1d87

Please sign in to comment.