Skip to content

Commit a52421b

Browse files
committed
Release: Allow remote repositories other than "git@github.com", eg. filesystem
1 parent b8a875c commit a52421b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

build/release/release.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// Usage:
55
// stable release: node release.js
66
// pre-release: node release.js --pre-release {version}
7-
// test run: node release.js --remote=user/repo
7+
// test run: node release.js --remote={repo}
8+
// - repo: "/tmp/repo" (filesystem), "user/repo" (github), "http://mydomain/repo.git" (another domain)
89

910
"use strict";
1011

@@ -515,7 +516,11 @@ function writePackage( pkg ) {
515516

516517
function bootstrap( fn ) {
517518
getRemote(function( remote ) {
518-
repo = "git@github.com:" + remote + ".git";
519+
if ( (/:/).test( remote ) || fs.existsSync( remote ) ) {
520+
repo = remote;
521+
} else {
522+
repo = "git@github.com:" + remote + ".git";
523+
}
519524
_bootstrap( fn );
520525
});
521526
}

0 commit comments

Comments
 (0)