tasks/release.js
function rollbackPublish() {
			try {
				chkoutRun(options.distBranch, function() {
					var cph = cmd('git rev-parse HEAD');
					if (pubHash && pubHash !== cph) {
						cmd('git checkout -qf ' + pubHash);
						cmd('git commit -q -m "Rollback: ' + tmpltData.distBranchPubMsg + '"');
						cmd('git push -f ' + options.repoName + ' ' + options.distBranch);
					} else if (!pubHash) {
						cmd('git push ' + options.repoName + ' --delete ' + options.distBranch);
					} else {
						rbot.log.verbose('Skipping rollback for ' + options.distBranch + ' for hash "' + pubHash
								+ '" (current hash: "' + cph + '")');
					}
				});
			} catch (e) {
				var msg = 'Failed to rollback publish branch changes!';
				rollCall.error(msg, e);
			}
		}
function rollbackPublish() {
			try {
				chkoutRun(options.distBranch, function() {
					var cph = cmd('git rev-parse HEAD');
					if (pubHash && pubHash !== cph) {
						cmd('git checkout -qf ' + pubHash);
						cmd('git commit -q -m "Rollback: ' + tmpltData.distBranchPubMsg + '"');
						cmd('git push -f ' + options.repoName + ' ' + options.distBranch);
					} else if (!pubHash) {
						cmd('git push ' + options.repoName + ' --delete ' + options.distBranch);
					} else {
						rbot.log.verbose('Skipping rollback for ' + options.distBranch + ' for hash "' + pubHash
								+ '" (current hash: "' + cph + '")');
					}
				});
			} catch (e) {
				var msg = 'Failed to rollback publish branch changes!';
				rollCall.error(msg, e);
			}
		}
function rollbackPublish ( ) { try { chkoutRun ( options . distBranch , function ( ) { var cph = cmd ( 'git rev-parse HEAD' ) ; if ( pubHash && pubHash !== cph ) { cmd ( 'git checkout -qf ' + pubHash ) ; cmd ( 'git commit -q -m "Rollback: ' + tmpltData . distBranchPubMsg + '"' ) ; cmd ( 'git push -f ' + options . repoName + ' ' + options . distBranch ) ; } else if ( ! pubHash ) { cmd ( 'git push ' + options . repoName + ' --delete ' + options . distBranch ) ; } else { rbot . log . verbose ( 'Skipping rollback for ' + options . distBranch + ' for hash "' + pubHash + '" (current hash: "' + cph + '")' ) ; } } ) ; } catch ( e ) { var msg = 'Failed to rollback publish branch changes!' ; rollCall . error ( msg , e ) ; } }
Reverts published branch
Reverts published branch