Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
firstRelease = false,
releaseCount,
dryRun = false,
noBrowse = false,
commitFrom,
}) {
if (help) {
printHelp();
return;
}
if (dryRun) {
printDryRunBanner();
}
printDeprecated({ firstRelease, releaseCount });
checkGitHubToken({ dryRun });
const config = loadConfig(dir);
const { currentVersion, baseBranch } = validate({ config, dir });
validateMergeStrategy({ config });
const { remote } = config;
pull({ remote, currentBranch: baseBranch, dir, dryRun });
fetchTags({ dir, dryRun });
push({ remote, currentBranch: baseBranch, dir, dryRun });
const { revisionRange } = await getRevisionRange({
yes,
commitFrom,
currentVersion,
dir,
});
let { nextVersion } = getNextVersion({ revisionRange, currentVersion, dir });
nextVersion = await confirmNextVersion({
yes,
currentVersion,
async function release({ help = false, dir = '.', dryRun = false }) {
if (help) {
printHelp();
return;
}
if (dryRun) {
printDryRunBanner();
}
checkGitHubToken({ dryRun });
const config = loadConfig(dir);
const { remote } = config;
const { currentVersion: version } = validate({ config, dir });
const {
appName,
latestCommitHash,
latestCommitUrl,
repoURL,
releaseTag,
} = gatherRepoInfo({ remote, version, dir });
await notifyReleaseStart({
config,
appName,
version,
latestCommitHash,
latestCommitUrl,
});