electron/script/release/bin/cleanup-release.ts
trop[bot] 6074f7ed31
build: cleanup release scripts, separate cli entrypoints from logic (#44082)
* build: cleanup release scripts, separate cli entrypoints from logic

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* build: use repo/org constants

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2024-10-01 14:08:15 -07:00

30 lines
504 B
TypeScript

import { parseArgs } from 'node:util';
import { cleanReleaseArtifacts } from '../release-artifact-cleanup';
const { values: { tag: _tag, releaseID } } = parseArgs({
options: {
tag: {
type: 'string'
},
releaseID: {
type: 'string',
default: ''
}
}
});
if (!_tag) {
console.error('Missing --tag argument');
process.exit(1);
}
const tag = _tag;
cleanReleaseArtifacts({
releaseID,
tag
})
.catch((err) => {
console.error(err);
process.exit(1);
});