6074f7ed31
* 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>
30 lines
504 B
TypeScript
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);
|
|
});
|