2021-01-24 21:25:32 +02:00
|
|
|
import { execCommand2, rootDir, gitPullTry, completeReleaseWithChangelog } from './tool-utils';
|
2021-01-04 17:01:45 +02:00
|
|
|
|
|
|
|
const serverDir = `${rootDir}/packages/server`;
|
|
|
|
|
|
|
|
async function main() {
|
2021-09-29 17:49:59 +02:00
|
|
|
// const argv = require('yargs').argv;
|
|
|
|
// if (!['release', 'prerelease'].includes(argv.type)) throw new Error('Must specify release type. Either --type=release or --type=prerelease');
|
|
|
|
// const isPreRelease = argv.type === 'prerelease';
|
|
|
|
|
2021-09-29 18:55:54 +02:00
|
|
|
// const isPreRelease = false;
|
2021-05-14 17:17:02 +02:00
|
|
|
|
2021-01-04 17:01:45 +02:00
|
|
|
await gitPullTry();
|
|
|
|
|
2021-01-18 12:13:26 +02:00
|
|
|
process.chdir(serverDir);
|
2021-12-27 19:00:01 +02:00
|
|
|
const version = (await execCommand2('npm version patch')).trim();
|
2021-09-29 18:55:54 +02:00
|
|
|
const versionSuffix = ''; // isPreRelease ? '-beta' : '';
|
2021-06-11 18:24:59 +02:00
|
|
|
const tagName = `server-${version}${versionSuffix}`;
|
2021-01-04 17:01:45 +02:00
|
|
|
|
2021-01-24 21:25:32 +02:00
|
|
|
const changelogPath = `${rootDir}/readme/changelog_server.md`;
|
2021-09-23 18:13:54 +02:00
|
|
|
|
2021-09-29 18:55:54 +02:00
|
|
|
await completeReleaseWithChangelog(changelogPath, version, tagName, 'Server', false);
|
2021-01-04 17:01:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
main().catch((error) => {
|
|
|
|
console.error('Fatal error');
|
|
|
|
console.error(error);
|
|
|
|
process.exit(1);
|
|
|
|
});
|