1
0
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:
Laurent Cozic 2020-12-27 22:25:17 +00:00
parent 1ee177880d
commit 2a1434f987
2 changed files with 11 additions and 10 deletions

View File

@ -24,5 +24,6 @@
"yosay": "^2.0.1"
},
"repository": "https://github.com/laurent22/generator-joplin",
"license": "MIT"
"license": "MIT",
"private": true
}

View File

@ -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) => {