chore: cleanup unusued variables + enable linting (#38898)
This commit is contained in:
parent
e900f6ecc3
commit
ef6569b7d3
36 changed files with 31 additions and 89 deletions
|
@ -12,7 +12,7 @@ function parseCommandLine () {
|
|||
string: ['bump', 'version'],
|
||||
boolean: ['dryRun', 'help'],
|
||||
alias: { version: ['v'] },
|
||||
unknown: arg => { help = true; }
|
||||
unknown: () => { help = true; }
|
||||
});
|
||||
if (help || opts.help || !opts.bump) {
|
||||
console.log(`
|
||||
|
@ -33,14 +33,6 @@ async function main () {
|
|||
const currentVersion = getElectronVersion();
|
||||
const version = await nextVersion(opts.bump, currentVersion);
|
||||
|
||||
const parsed = semver.parse(version);
|
||||
const components = {
|
||||
major: parsed.major,
|
||||
minor: parsed.minor,
|
||||
patch: parsed.patch,
|
||||
pre: parsed.prerelease
|
||||
};
|
||||
|
||||
// print would-be new version and exit early
|
||||
if (opts.dryRun) {
|
||||
console.log(`new version number would be: ${version}\n`);
|
||||
|
@ -97,18 +89,6 @@ async function nextVersion (bumpType, version) {
|
|||
return version;
|
||||
}
|
||||
|
||||
function isMajorStable (bump, currentVersion) {
|
||||
if (versionUtils.isBeta(currentVersion) && (bump === 'stable')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function isMajorNightly (version, currentVersion) {
|
||||
const parsed = semver.parse(version);
|
||||
const current = semver.parse(currentVersion);
|
||||
if (versionUtils.isNightly(currentVersion) && (parsed.major > current.major)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
main().catch((error) => {
|
||||
console.error(error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue