Skip to content

Commit 562f884

Browse files
committed
Release: Ability to provide a different repo for testing.
1 parent a74b69e commit 562f884

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

build/release/release.js

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
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
78

89
"use strict";
910

10-
var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime, preRelease,
11+
var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime, preRelease, repo,
1112
fs = require( "fs" ),
1213
rnewline = /\r?\n/,
13-
repo = "git@github.com:jquery/jquery-ui.git",
1414
branch = "master";
1515

1616
walk([
@@ -357,6 +357,44 @@ function writePackage( pkg ) {
357357
}
358358

359359
function bootstrap( fn ) {
360+
getRemote(function( remote ) {
361+
repo = "git@github.com:" + remote + ".git";
362+
_bootstrap( fn );
363+
});
364+
}
365+
366+
function getRemote( fn ) {
367+
var matches, remote;
368+
369+
console.log( "Determining remote repo..." );
370+
process.argv.forEach(function( arg ) {
371+
matches = /--remote=(.+)/.exec( arg );
372+
if ( matches ) {
373+
remote = matches[ 1 ];
374+
}
375+
});
376+
377+
if ( remote ) {
378+
fn( remote );
379+
return;
380+
}
381+
382+
console.log();
383+
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
384+
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
385+
console.log( " !! !!" );
386+
console.log( " !! Using jquery/jquery-ui !!" );
387+
console.log( " !! !!" );
388+
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
389+
console.log( " !!!!!!!!!!!!!!!!!!!!!!!!!!!!" );
390+
console.log();
391+
console.log( "Press enter to continue, or ctrl+c to cancel." );
392+
prompt(function() {
393+
fn( "jquery/jquery-ui" );
394+
});
395+
}
396+
397+
function _bootstrap( fn ) {
360398
console.log( "Determining release type..." );
361399
preRelease = process.argv.indexOf( "--pre-release" );
362400
if ( preRelease !== -1 ) {

0 commit comments

Comments
 (0)