electron/script/release/bin/cleanup-release.ts
Samuel Attard f4ffd018e6
build: cleanup release scripts, separate cli entrypoints from logic (#44058)
* build: cleanup release scripts, separate cli entrypoints from logic

* build: use repo/org constants
2024-10-01 13:51:40 -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);
});