mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-30 08:26:59 +02:00
Electron release v0.10.24
This commit is contained in:
parent
fbf7b2cc43
commit
2a93dea378
2
ElectronClient/app/package-lock.json
generated
2
ElectronClient/app/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Joplin",
|
||||
"version": "0.10.23",
|
||||
"version": "0.10.24",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Joplin",
|
||||
"version": "0.10.23",
|
||||
"version": "0.10.24",
|
||||
"description": "Joplin for Desktop",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
@ -7,6 +7,14 @@ const request = require('request');
|
||||
const url = 'https://api.github.com/repos/laurent22/joplin/releases/latest';
|
||||
const readmePath = __dirname + '/../../README.md';
|
||||
|
||||
async function msleep(ms) {
|
||||
return new Promise((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
resolve();
|
||||
}, ms);
|
||||
});
|
||||
}
|
||||
|
||||
async function gitHubLatestRelease() {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.get({
|
||||
@ -48,8 +56,23 @@ function setReadmeContent(content) {
|
||||
return fs.writeFileSync(readmePath, content);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const release = await gitHubLatestRelease();
|
||||
async function main(argv) {
|
||||
const waitForVersion = argv.length === 3 ? argv[2] : null;
|
||||
|
||||
if (waitForVersion) console.info('Waiting for version ' + waitForVersion + ' to be released before updating readme...');
|
||||
|
||||
let release = null;
|
||||
while (true) {
|
||||
release = await gitHubLatestRelease();
|
||||
if (!waitForVersion) break;
|
||||
|
||||
if (release.tag_name !== waitForVersion) {
|
||||
await msleep(15000);
|
||||
} else {
|
||||
console.info('Got version ' + waitForVersion);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const winUrl = downloadUrl(release, 'windows');
|
||||
const macOsUrl = downloadUrl(release, 'macos');
|
||||
@ -64,6 +87,6 @@ async function main() {
|
||||
setReadmeContent(content);
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
main(process.argv).catch((error) => {
|
||||
console.error('Fatal error', error);
|
||||
});
|
@ -9,4 +9,6 @@ git commit -m "Electron release $VERSION"
|
||||
git tag $VERSION
|
||||
git push && git push --tags
|
||||
|
||||
echo "Create a draft release at: https://github.com/laurent22/joplin/releases/tag/$VERSION"
|
||||
echo "Create a draft release at: https://github.com/laurent22/joplin/releases/tag/$VERSION"
|
||||
|
||||
node "$APP_DIR/update-readme-download.js v$VERSION"
|
Loading…
Reference in New Issue
Block a user