Skip to content

Commit 53d1520

Browse files
committed
https://scheduleonce.atlassian.net/browse/ONCEHUB-52065
1 parent 8a44936 commit 53d1520

File tree

4 files changed

+13
-1407
lines changed

4 files changed

+13
-1407
lines changed

deploy.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1+
#!/bin/sh
12
set -e
23

34
node package-deploy/npm-login.js $(cat "/etc/npm-cred/NPM_AUTH_TOKEN")
4-
5+
npm whoami
56
npm i
6-
npm run package
7-
8-
filename="$(npm pack --dry-run | tail -n 1)"
9-
npm publish $filename --registry=https://registry.npmjs.org/
7+
npm publish
108

11-
echo "$filename package pushed to myGet successfully"
9+
echo "package pushed to NPM successfully"

package-deploy/npm-login.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ process.argv.forEach(function(val, index, array) {
77
if (index == 2) token = val;
88
});
99

10-
let registry = 'https://registry.npmjs.org/';
10+
let registry = '//registry.npmjs.org/';
1111

12-
var homePath = process.env.HOME ? process.env.HOME : process.env.USERPROFILE;
13-
var configPath = configPath ? configPath : path.join(homePath, '.npmrc');
12+
var configPath = configPath ? configPath : path.join(__dirname, '../', '.npmrc');
1413

15-
fs.writeFile(configPath, `${registry}:_authToken=${token}` + '\n', () => {});
14+
fs.writeFile(configPath, `${registry}:_authToken=${token}` + '\n', (err, message) => { if(err){ console.log(err , message)}});

0 commit comments

Comments
 (0)