Make it easier to debug the release script.

This commit is contained in:
Dave Methvin 2013-05-06 10:32:16 -04:00
parent 2406b5e290
commit caf963992d

View File

@ -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 ) {
@ -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 );
}