Files
suwayomi-material-you-webui/tools/scripts/release/createCommitChangelog.ts

33 lines
911 B
TypeScript
Raw Normal View History

/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import yargs from 'yargs';
2025-02-09 23:19:51 +01:00
import { hideBin } from 'yargs/helpers';
2025-02-17 02:45:02 +01:00
import { createCommitChangelog } from './CommitChangelog.utils.ts';
2025-02-09 23:19:51 +01:00
const { sha } = yargs(hideBin(process.argv))
.options({
sha: {
description: 'The hash of the last commit of the previous release',
type: 'string',
demandOption: true,
},
})
.parseSync();
if (!sha) {
throw new Error('Sha of last commit of the previous release has to be passed!');
}
createCommitChangelog(sha)
.then(console.log)
.catch((error) => {
console.error('Failed due to', error);
process.exit(1);
});