feat: derive mobile build number from semver (#30569)

This commit is contained in:
bo0tzz authored and GitHub committed 2026-08-11 12:45:32 +00:00
1 parent 9273a4ca2a
commit cf17dcbfee
5 files changed
+104 -41

No files matched your search

+18 -25
View File
@@ -23,32 +23,25 @@ export const cli = (argv: string[]) => {
.choices(RELEASE_TYPES)
.makeOptionMandatory(),
)
.addOption(
new Option('-m, --mobile <value>', 'pump mobile build number')
.choices(['true', 'false'])
.default('false'),
)
.action(
({ type, mobile }: { type: ReleaseType; mobile: 'true' | 'false' }) => {
try {
console.log(handleRelease({ type, mobile: mobile === 'true' }));
} catch (error) {
if (error instanceof ReleaseInputError) {
console.log(program.usage());
process.exit(1);
}
if (error instanceof ReleaseError) {
console.log(
`Invalid pump: ${type}. Pumping from ${error.version} to ${error.newVersion} is not allowed.`,
);
process.exit(1);
}
throw error;
.action(({ type }: { type: ReleaseType }) => {
try {
console.log(handleRelease({ type }));
} catch (error) {
if (error instanceof ReleaseInputError) {
console.log(program.usage());
process.exit(1);
}
},
);
if (error instanceof ReleaseError) {
console.log(
`Invalid pump: ${type}. Pumping from ${error.version} to ${error.newVersion} is not allowed.`,
);
process.exit(1);
}
throw error;
}
});
return program.parse(argv);
};