You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Plugin Repo: Simplify publishing script
This commit is contained in:
30
packages/tools/release-plugin-repo-cli.ts
Normal file
30
packages/tools/release-plugin-repo-cli.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { chdir } from 'process';
|
||||
import { rootDir, gitPullTry, execCommand2, releaseFinalGitCommands } from './tool-utils';
|
||||
|
||||
const workDir = `${rootDir}/packages/plugin-repo-cli`;
|
||||
|
||||
async function main() {
|
||||
await gitPullTry();
|
||||
|
||||
chdir(rootDir);
|
||||
await execCommand2('yarn run tsc');
|
||||
|
||||
chdir(workDir);
|
||||
await execCommand2('yarn run dist');
|
||||
|
||||
const newVersion = (await execCommand2('npm version patch')).trim();
|
||||
|
||||
console.info(`New version: ${newVersion}`);
|
||||
const tagName = `plugin-repo-cli-${newVersion}`;
|
||||
console.info(`Tag name: ${tagName}`);
|
||||
|
||||
await execCommand2('npm publish');
|
||||
|
||||
console.info(releaseFinalGitCommands('Plugin Repo CLI', newVersion, tagName));
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error('Fatal error');
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user