mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Generator: Fixed publish logic
This commit is contained in:
parent
1ee177880d
commit
2a1434f987
@ -24,5 +24,6 @@
|
||||
"yosay": "^2.0.1"
|
||||
},
|
||||
"repository": "https://github.com/laurent22/generator-joplin",
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"private": true
|
||||
}
|
@ -14,21 +14,21 @@ async function main() {
|
||||
const version = (await execCommand('npm version patch')).trim();
|
||||
const tagName = `plugin-generator-${version}`;
|
||||
|
||||
console.info(`New version number: ${version}`);
|
||||
|
||||
await setPackagePrivateField(packageFilePath, false);
|
||||
|
||||
try {
|
||||
console.info(`New version number: ${version}`);
|
||||
|
||||
await execCommandVerbose('npm', ['publish']);
|
||||
await gitPullTry();
|
||||
await execCommandVerbose('git', ['add', '-A']);
|
||||
await execCommandVerbose('git', ['commit', '-m', `Plugin Generator release ${version}`]);
|
||||
await execCommandVerbose('git', ['tag', tagName]);
|
||||
await execCommandVerbose('git', ['push']);
|
||||
await execCommandVerbose('git', ['push', '--tags']);
|
||||
} finally {
|
||||
await setPackagePrivateField(packageFilePath, true);
|
||||
}
|
||||
|
||||
await gitPullTry();
|
||||
await execCommandVerbose('git', ['add', '-A']);
|
||||
await execCommandVerbose('git', ['commit', '-m', `Plugin Generator release ${version}`]);
|
||||
await execCommandVerbose('git', ['tag', tagName]);
|
||||
await execCommandVerbose('git', ['push']);
|
||||
await execCommandVerbose('git', ['push', '--tags']);
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
|
Loading…
Reference in New Issue
Block a user