mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Tools: Automate updating Git repo when creating new Clipper release
This commit is contained in:
parent
2ded983828
commit
e75417d26e
@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Joplin Web Clipper [DEV]",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Capture and save web pages and screenshots from your browser to Joplin.",
|
||||
"homepage_url": "https://joplin.cozic.net",
|
||||
"icons": {
|
||||
|
@ -28,10 +28,11 @@ async function updateManifestVersionNumber(manifestPath) {
|
||||
manifest.version = v.join('.');
|
||||
console.info('New version: ' + manifest.version);
|
||||
await fs.writeFile(manifestPath, JSON.stringify(manifest, null, 4));
|
||||
return manifest.version;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
await updateManifestVersionNumber(clipperDir + '/manifest.json');
|
||||
const newVersion = await updateManifestVersionNumber(clipperDir + '/manifest.json');
|
||||
|
||||
console.info('Building extension...');
|
||||
process.chdir(clipperDir + '/popup');
|
||||
@ -74,6 +75,13 @@ async function main() {
|
||||
console.info(await execCommand('7z a -tzip ' + dist.name + '.zip *'));
|
||||
console.info(await execCommand('mv ' + dist.name + '.zip ..'));
|
||||
}
|
||||
|
||||
console.info(await execCommand('git pull'));
|
||||
console.info(await execCommand('git add -A'));
|
||||
console.info(await execCommand('git commit -m "Clipper release v' + newVersion + '"'));
|
||||
console.info(await execCommand('git tag clipper-' + newVersion));
|
||||
console.info(await execCommand('git push'));
|
||||
console.info(await execCommand('git push --tags'));
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
|
Loading…
Reference in New Issue
Block a user