aboutsummaryrefslogtreecommitdiffstats
path: root/build/release.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2013-05-06 10:32:16 -0400
committerDave Methvin <dave.methvin@gmail.com>2013-05-06 10:32:16 -0400
commitcaf963992d98932560a7e4cd1b8a9c1b753f66e9 (patch)
tree269da705b27abbe3f43dddbb8cf17e435a8d42c7 /build/release.js
parent2406b5e290c1364c0a58832e0bbf4bcf82abfe10 (diff)
downloadjquery-caf963992d98932560a7e4cd1b8a9c1b753f66e9.tar.gz
jquery-caf963992d98932560a7e4cd1b8a9c1b753f66e9.zip
Make it easier to debug the release script.
Diffstat (limited to 'build/release.js')
-rw-r--r--build/release.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/build/release.js b/build/release.js
index f29673aca..9cda180f1 100644
--- a/build/release.js
+++ b/build/release.js
@@ -106,10 +106,10 @@ function checkGitStatus( next ) {
die( "Branches don't match: Wanted " + branch + ", got " + onBranch );
}
if ( /Changes to be committed/i.test( stdout ) ) {
- die( "Please commit changed files before attemping to push a release." );
+ dieIfReal( "Please commit changed files before attemping to push a release." );
}
if ( /Changes not staged for commit/i.test( stdout ) ) {
- die( "Please stash files before attempting to push a release." );
+ dieIfReal( "Please stash files before attempting to push a release." );
}
next();
});
@@ -166,7 +166,7 @@ function makeReleaseCopies( next ) {
function setNextVersion( next ) {
updatePackageVersion( nextVersion );
- git( [ "commit", "-a", "-m", "Updating the source version to " + nextVersion ], next, debug );
+ git( [ "commit", "-a", "-m", "Updating the source version to " + nextVersion + "✓™" ], next, debug );
}
function uploadToCDN( next ) {
@@ -226,7 +226,7 @@ function exec( cmd, args, fn, skip ) {
fn( "", "", "" );
} else {
console.log( cmd + " " + args.join(" ") );
- child.execFile( cmd, args, { env: process.env },
+ child.execFile( cmd, args, { env: process.env },
function( err, stdout, stderr ) {
if ( err ) {
die( stderr || stdout || err );
@@ -242,6 +242,14 @@ function die( msg ) {
process.exit( 1 );
}
+function dieIfReal( msg ) {
+ if ( debug ) {
+ console.log ( "DIE: " + msg );
+ } else {
+ die( msg );
+ }
+}
+
function exit() {
process.exit( 0 );
}