should-release-it
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -24,2 +24,5 @@ #!/usr/bin/env node | ||
const argv = (0, minimist_1.default)(process.argv.slice(2)); | ||
if (argv.silent) { | ||
logger_1.logger.disable(); | ||
} | ||
const currentVersion = argv['current-version'] || ((_a = (0, get_package_json_1.getPackageJson)()) === null || _a === void 0 ? void 0 : _a.version); | ||
@@ -40,3 +43,3 @@ if (!currentVersion) { | ||
if (!stdout || stderr || error) { | ||
// Could not find any commit message, releasing it as is | ||
logger_1.logger.log(`Could not find any commit message between v${currentVersion} and HEAD, releasing it as is`); | ||
process.exitCode = 0; | ||
@@ -59,14 +62,16 @@ return; | ||
const isRelease = isReleaseRegex.test(m); | ||
logger_1.logger.log(isRelease ? 'Should trigger a release:' : 'Should NOT trigger a release:', m); | ||
return isRelease; | ||
}); | ||
if (!shouldRelease) { | ||
logger_1.logger.log('No meaningful commits found, we should not release'); | ||
process.exitCode = 1; | ||
return; | ||
} | ||
logger_1.logger.log('Found at least one commit that require a release, we should release'); | ||
process.exitCode = 0; | ||
}); | ||
void init().catch((err) => { | ||
logger_1.logger.error(err); | ||
// Failed to run, let the release happen | ||
logger_1.logger.error('Failed to run, let the release happen', err); | ||
process.exitCode = 0; | ||
}); |
{ | ||
"name": "should-release-it", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Check if should release new version by looking at the commits using conventional commits", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/DiogoAbu/should-release-it.git", |
@@ -87,2 +87,3 @@ <h1 align="center">Should Release-It</h1><br> | ||
| --release-it-dir | Directory to search for the `release-it` config file, defaults to the current working directory. | [string] | | ||
| --silent | Mute logs. | | | ||
@@ -89,0 +90,0 @@ ## 💬 Contributing |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15601
179
96