From 3367352e4f76bb4d84bbd9fc3a9fecb8de57f06c Mon Sep 17 00:00:00 2001 From: eternalsky Date: Tue, 27 Aug 2024 22:11:05 +0800 Subject: [PATCH] chore(*): reset release script --- tools/release/index.ts | 70 +++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/tools/release/index.ts b/tools/release/index.ts index ccaf4e9bf2..74b193bb4c 100644 --- a/tools/release/index.ts +++ b/tools/release/index.ts @@ -219,43 +219,43 @@ registryTask(__filename, 'release', async () => { // await registryChangelog(__filename); const { masterTag } = getVersion(); - // await registryBuild(__filename); + await registryBuild(__filename); - // await registryCheck(__filename); + await registryCheck(__filename); - // await registryTask(__filename, 'release check', async () => { - // await registryCheckSass(__filename); - // await registryTask(__filename, 'check git tag', checkTags); - // await registryTask(__filename, 'check build outputs', checkFiles); - // }); - // await registryTask(__filename, 'publish to npm', async () => { - // const { version } = getVersion(); - // const versionTag = version.match(/[a-z]+/)?.[0]; - // const distTag: string = - // ARGV.tag || - // versionTag || - // ( - // await inquirer.prompt({ - // name: 'tag', - // type: 'list', - // choices: ['latest', 'next', 'beta'], - // default: 0, - // message: 'publish dist-tags:', - // }) - // ).tag; - // await registryTask(__filename, 'publish next to npm', publishNpm.bind(undefined, distTag)); - // await registryTask( - // __filename, - // 'publish next-docs to npm', - // publishNpmForDocs.bind(undefined, distTag), - // () => { - // fs.removeSync(NEXT_DOCS_PATH); - // } - // ); - // await registryTask(__filename, 'tnpm sync', () => { - // execSync('tnpm', ['sync', '@alifd/next', NEXT_DOCS_NAME]); - // }); - // }); + await registryTask(__filename, 'release check', async () => { + await registryCheckSass(__filename); + await registryTask(__filename, 'check git tag', checkTags); + await registryTask(__filename, 'check build outputs', checkFiles); + }); + await registryTask(__filename, 'publish to npm', async () => { + const { version } = getVersion(); + const versionTag = version.match(/[a-z]+/)?.[0]; + const distTag: string = + ARGV.tag || + versionTag || + ( + await inquirer.prompt({ + name: 'tag', + type: 'list', + choices: ['latest', 'next', 'beta'], + default: 0, + message: 'publish dist-tags:', + }) + ).tag; + await registryTask(__filename, 'publish next to npm', publishNpm.bind(undefined, distTag)); + await registryTask( + __filename, + 'publish next-docs to npm', + publishNpmForDocs.bind(undefined, distTag), + () => { + fs.removeSync(NEXT_DOCS_PATH); + } + ); + await registryTask(__filename, 'tnpm sync', () => { + execSync('tnpm', ['sync', '@alifd/next', NEXT_DOCS_NAME]); + }); + }); const commitRollbackFns = new Set<() => unknown>(); await registryTask(