build: cleanup release scripts, separate cli entrypoints from logic (#44081)
* 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>
This commit is contained in:
parent
2f519a8f2e
commit
98b1d305b6
17 changed files with 410 additions and 300 deletions
30
script/release/bin/cleanup-release.ts
Normal file
30
script/release/bin/cleanup-release.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
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);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue