Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Commit

Permalink
improve if loop flow
Browse files Browse the repository at this point in the history
  • Loading branch information
boennemann committed Feb 7, 2013
1 parent 30282ab commit cfdd222
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions bin/semver-sync
Expand Up @@ -91,12 +91,11 @@ var verify = function (sources, version) {
}
}

if (argv.verify) {
if (argv.verify || argv.bump || argv.tag) {
verify(sources, version);
}

if (argv.bump || argv.tag) {
verify(sources, version);
if (!~['major', 'minor', 'patch'].indexOf(argv.bump)) {
console.log(ERROR + 'Invalid release name specified, please use ' + 'major, minor or patch.'.bold);
process.exit(1);
Expand All @@ -106,10 +105,10 @@ if (argv.bump || argv.tag) {
sync.setVersion(sources, version);
console.log(SUCCESS + 'Version number was updated to ' + version.bold.green + ' in '
+ sources.join(', ').bold + '.');
}

if (argv.tag) {
sync.commitSourcesAndCreateTag(sources, version, function () {
console.log(SUCCESS + 'Files have been commited and tag ' + ('v' + version).bold.green + ' was created.');
});
}
}
if (argv.tag) {
sync.commitSourcesAndCreateTag(sources, version, function () {
console.log(SUCCESS + 'Files have been commited and tag ' + ('v' + version).bold.green + ' was created.');
});
}

0 comments on commit cfdd222

Please sign in to comment.