1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-24 20:19:10 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Laurent Cozic
319c1d5ca5 Plugin Generator release v1.4.3 2020-11-18 10:34:32 +00:00
Laurent Cozic
18df352a81 update 2020-11-18 10:34:14 +00:00
Laurent Cozic
6606a02387 update 2020-11-18 10:33:01 +00:00
Laurent Cozic
6c6df7f1df gen 2020-11-18 10:28:40 +00:00
7 changed files with 47 additions and 3 deletions

View File

@@ -24,6 +24,7 @@
"releaseCli": "node packages/tools/release-cli.js",
"releaseClipper": "node packages/tools/release-clipper.js",
"releaseDesktop": "node packages/tools/release-electron.js",
"releasePluginGenerator": "node packages/tools/release-plugin-generator.js",
"setupNewRelease": "node ./packages/tools/setupNewRelease",
"updatePluginTypes": "./packages/generator-joplin/updateTypes.sh",
"tsc": "lerna run tsc --stream --parallel",

View File

@@ -1,6 +1,6 @@
{
"name": "generator-joplin",
"version": "1.4.0",
"version": "1.4.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "generator-joplin",
"version": "1.4.0",
"version": "1.4.3",
"description": "Scaffolds out a new Joplin plugin",
"homepage": "https://joplinapp.org",
"author": {

View File

@@ -3,3 +3,4 @@ set -e
git pull
npm version patch
npm publish

View File

@@ -15,7 +15,7 @@ async function main() {
console.info(`New version number: ${version}`);
console.info(await execCommand('git add -A'));
console.info(await execCommand(`git commit -m "Electron release ${version}"`));
console.info(await execCommand(`git commit -m "Desktop release ${version}"`));
console.info(await execCommand(`git tag ${tagName}`));
console.info(await execCommand('git push && git push --tags'));

View File

@@ -0,0 +1,30 @@
const { execCommand, execCommandVerbose, rootDir, gitPullTry } = require('./tool-utils.js');
const genDir = `${rootDir}/packages/generator-joplin`;
async function main() {
process.chdir(genDir);
console.info(`Running from: ${process.cwd()}`);
await gitPullTry();
const version = (await execCommand('npm version patch')).trim();
const tagName = `plugin-generator-${version}`;
console.info(`New version number: ${version}`);
console.info(await execCommandVerbose('npm', ['publish']));
await gitPullTry();
console.info(await execCommandVerbose('git', ['add', '-A']));
console.info(await execCommandVerbose('git', ['commit', '-m', `Plugin Generator release ${version}`]));
console.info(await execCommandVerbose('git', ['tag', tagName]));
console.info(await execCommandVerbose('git', ['push']));
console.info(await execCommandVerbose('git', ['push', '--tags']));
}
main().catch((error) => {
console.error('Fatal error');
console.error(error);
process.exit(1);
});

View File

@@ -203,6 +203,18 @@ async function saveGitHubUsernameCache(cache) {
await fs.writeFile(path, JSON.stringify(cache));
}
toolUtils.gitPullTry = async function() {
try {
await toolUtils.execCommand('git pull');
} catch (error) {
if (error.message.includes('no tracking information for the current branch')) {
console.info('Skipping git pull because no tracking information on current branch');
} else {
throw error;
}
}
};
toolUtils.githubUsername = async function(email, name) {
const cache = await loadGitHubUsernameCache();
const cacheKey = `${email}:${name}`;