Skip to content

Commit 0416844

Browse files
committed
Add: npm publish to travis
1 parent 1a02f9a commit 0416844

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,21 @@ before_deploy:
1414
Dockerfile \
1515
.dockerignore \
1616
app.js \
17+
cli.js \
1718
config.js \
1819
package.json \
1920
package-lock.json \
2021
docs \
2122
lib \
2223
public
24+
# npm deploy
25+
- >
26+
if [ -n "$TRAVIS_TAG" ] ; then
27+
mkdir _pkg; cd _pkg; tar xzf ../psitransfer-$TRAVIS_TAG.tar.gz ;
28+
npm set //registry.npmjs.org/:_authToken $NPM_API_TOKEN ;
29+
npm publish;
30+
cd .. ;
31+
fi
2332
2433
deploy:
2534
provider: releases

app.js

100644100755
File mode changed.

cli.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env node
2+
require('./app');

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "psitransfer",
3-
"version": "1.3.2",
3+
"version": "0.0.0",
44
"description": "Simple open source self-hosted file sharing solution",
55
"keywords": [
66
"share",
@@ -26,6 +26,9 @@
2626
"tusboy": "^1.1.1",
2727
"uuid": "^3.3.2"
2828
},
29+
"bin":{
30+
"psitransfer": "cli.js"
31+
},
2932
"devDependencies": {},
3033
"scripts": {
3134
"start": "NODE_ENV=production node app.js",

scripts/create-bundle.sh

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ tar -czf _releases/psitransfer-$NAME.tar.gz --transform "s~^~psitransfer-$NAME/~
2727
Dockerfile \
2828
.dockerignore \
2929
app.js \
30+
cli.js \
3031
config.js \
3132
package.json \
3233
package-lock.json \

0 commit comments

Comments
 (0)