1
0
mirror of https://github.com/laurent22/joplin.git synced 2026-04-02 10:51:52 +02:00

Compare commits

..

10 Commits

Author SHA1 Message Date
Laurent Cozic
54f4b41de8 CLI v1.4.3 2020-11-06 21:21:17 +00:00
Laurent Cozic
b33aeeecc5 remove postinstall 2020-11-06 21:19:07 +00:00
Laurent Cozic
7eefac0b54 CLI v1.4.2 2020-11-06 21:10:07 +00:00
Laurent Cozic
3fbec21c2e fix script 2020-11-06 20:59:25 +00:00
Laurent Cozic
d3b2f23983 fix script 2020-11-06 20:54:19 +00:00
Laurent Cozic
9956b6612d Added release script 2020-11-06 20:53:40 +00:00
Laurent Cozic
bc3f6dd51a fix cli release script 2020-11-06 20:50:32 +00:00
Laurent Cozic
7b0122a8db Merge branch 'dev' of github.com:laurent22/joplin into dev 2020-11-06 20:41:37 +00:00
Laurent Cozic
7ea4f570cb Tools: Refactor Android release script 2020-11-06 18:45:45 +00:00
Laurent Cozic
1e1f2582c5 Tools: minor tweak 2020-11-06 12:31:30 +00:00
11 changed files with 81 additions and 52 deletions

View File

@@ -23,6 +23,7 @@
"linkChecker": "linkchecker https://joplinapp.org",
"releaseDesktop": "node packages/tools/release-electron.js",
"releaseAndroid": "node packages/tools/release-android.js",
"releaseCli": "node packages/tools/release-cli.js",
"publishAll": "git pull && lerna version --no-git-tag-version && gulp completePublishAll"
},
"husky": {

View File

@@ -10,15 +10,23 @@ const tasks = {
// updateIgnoredTypeScriptBuild: require('../Tools/gulp/tasks/updateIgnoredTypeScriptBuild'),
};
async function makePackagePublic(filePath) {
const text = await fs.readFile(filePath, 'utf8');
const obj = JSON.parse(text);
delete obj.private;
await fs.writeFile(filePath, JSON.stringify(obj), 'utf8');
}
tasks.prepareBuild = {
fn: async () => {
const buildDir = `${__dirname}/build`;
await utils.copyDir(`${__dirname}/app`, buildDir, {
excluded: ['node_modules'],
});
// await utils.copyDir(`${__dirname}/locales-build`, `${buildDir}/locales`);
// await tasks.copyLib.fn();
await utils.copyFile(`${__dirname}/package.json`, `${buildDir}/package.json`);
await makePackagePublic(`${buildDir}/package.json`);
await utils.copyFile(`${__dirname}/package-lock.json`, `${buildDir}/package-lock.json`);
await utils.copyFile(`${__dirname}/gulpfile.js`, `${buildDir}/gulpfile.js`);

View File

@@ -1,6 +1,6 @@
{
"name": "@joplinapp/app-cli",
"version": "1.3.13",
"version": "1.4.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,5 +1,5 @@
{
"name": "@joplinapp/app-cli",
"name": "joplin",
"description": "Joplin CLI Client",
"license": "MIT",
"author": "Laurent Cozic",
@@ -7,7 +7,6 @@
"scripts": {
"test": "node node_modules/jasmine/bin/jasmine.js --fail-fast=true --config=tests/support/jasmine.json",
"test-ci": "node node_modules/jasmine/bin/jasmine.js --config=tests/support/jasmine.json",
"postinstall": "npm run build",
"build": "gulp build",
"start": "gulp build -L && node \"build/main.js\" --stack-trace-enabled --log-level debug --env dev",
"tsc": "node node_modules/typescript/bin/tsc --project tsconfig.json",
@@ -31,7 +30,7 @@
],
"owner": "Laurent Cozic"
},
"version": "1.4.0",
"version": "1.4.3",
"bin": {
"joplin": "./main.js"
},

View File

@@ -7,7 +7,6 @@
"scripts": {
"dist": "node_modules/.bin/electron-builder",
"build": "gulp build",
"preinstall": "node tools/unlinkReact",
"postinstall": "npm run build && gulp electronRebuild",
"tsc": "node node_modules/typescript/bin/tsc --project tsconfig.json",
"watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.json",

View File

@@ -1,50 +1,50 @@
// const execCommand = function(command) {
// const exec = require('child_process').exec;
const execCommand = function(command) {
const exec = require('child_process').exec;
// console.info(`Running: ${command}`);
console.info(`Running: ${command}`);
// return new Promise((resolve, reject) => {
// exec(command, (error, stdout) => {
// if (error) {
// if (error.signal == 'SIGTERM') {
// resolve('Process was killed');
// } else {
// reject(error);
// }
// } else {
// resolve(stdout.trim());
// }
// });
// });
// };
return new Promise((resolve, reject) => {
exec(command, (error, stdout) => {
if (error) {
if (error.signal == 'SIGTERM') {
resolve('Process was killed');
} else {
reject(error);
}
} else {
resolve(stdout.trim());
}
});
});
};
// const isWindows = () => {
// return process && process.platform === 'win32';
// };
const isWindows = () => {
return process && process.platform === 'win32';
};
async function main() {
// electron-rebuild --arch ia32 && electron-rebuild --arch x64
console.warn('!!!!!!!!!!!!!!!!!!!!!!!!ELECTRON REBUILD IS DISABLED!!!!!!!!!!!!!!!!!!!!!!!!');
return;
// console.warn('ELECTRON REBUILD IS DISABLED!!!!!!!!!!!!!!!!!!!!!!!!');
// return;
// let exePath = `${__dirname}/../node_modules/.bin/electron-rebuild`;
// if (isWindows()) exePath += '.cmd';
let exePath = `${__dirname}/../node_modules/.bin/electron-rebuild`;
if (isWindows()) exePath += '.cmd';
// process.chdir(`${__dirname}/..`);
process.chdir(`${__dirname}/..`);
// if (isWindows()) {
// // const promises = [
// // execCommand([`"${exePath}"`, '--arch ia32'].join(' ')),
// // execCommand([`"${exePath}"`, '--arch x64'].join(' ')),
// // ];
if (isWindows()) {
// const promises = [
// execCommand([`"${exePath}"`, '--arch ia32'].join(' ')),
// execCommand([`"${exePath}"`, '--arch x64'].join(' ')),
// ];
// // await Promise.all(promises);
// console.info(await execCommand([`"${exePath}"`, '--arch ia32'].join(' ')));
// console.info(await execCommand([`"${exePath}"`, '--arch x64'].join(' ')));
// } else {
// console.info(await execCommand([`"${exePath}"`].join(' ')));
// }
// await Promise.all(promises);
console.info(await execCommand([`"${exePath}"`, '--arch ia32'].join(' ')));
console.info(await execCommand([`"${exePath}"`, '--arch x64'].join(' ')));
} else {
console.info(await execCommand([`"${exePath}"`].join(' ')));
}
}
module.exports = main;

View File

@@ -138,8 +138,8 @@ android {
applicationId "net.cozic.joplin"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2097607
versionName "1.4.5"
versionCode 2097608
versionName "1.4.6"
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}

View File

@@ -9,7 +9,6 @@
"build": "gulp build",
"tsc": "node node_modules/typescript/bin/tsc --project tsconfig.json",
"watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.json",
"preinstall": "node tools/unlinkReact.js",
"clean": "node tools/clean.js",
"postinstall": "jetify && npm run build"
},

View File

@@ -1,9 +1,7 @@
const { execCommand } = require('./tool-utils.js');
const path = require('path');
const { execCommand, rootDir } = require('./tool-utils.js');
const fs = require('fs-extra');
const moment = require('moment');
const rootDir = path.dirname(__dirname);
const appDir = `${rootDir}/packages/app-cli`;
const changelogPath = `${rootDir}/readme/changelog_cli.md`;
@@ -59,8 +57,7 @@ async function main() {
await execCommand('git pull');
await execCommand('touch app/main.js');
await execCommand('npm run build');
// await execCommand('cp package.json build/');
await execCommand('cp ../README.md build/');
await execCommand('cp ../../README.md build/');
process.chdir(`${appDir}/build`);

View File

@@ -23,8 +23,25 @@ toolUtils.execCommand = function(command) {
});
};
function quotePath(path) {
if (!path) return '';
if (path.indexOf('"') < 0 && path.indexOf(' ') < 0) return path;
path = path.replace(/"/, '\\"');
return `"${path}"`;
}
function commandToString(commandName, args = []) {
const output = [quotePath(commandName)];
for (const arg of args) {
output.push(quotePath(arg));
}
return output.join(' ');
}
toolUtils.execCommandVerbose = function(commandName, args = []) {
console.info(`> ${commandName}`, args && args.length ? args : '');
console.info(`> ${commandToString(commandName, args)}`);
const promise = execa(commandName, args);
promise.stdout.pipe(process.stdout);
return promise;

View File

@@ -1,5 +1,14 @@
# Joplin terminal app changelog
## [cli-v1.4.3](https://github.com/laurent22/joplin/releases/tag/cli-v1.4.3) - 2020-11-06T21:19:29Z
IMPORTANT: If you use the web API, please note that there are a few breaking changes in this release. See here for more information: https://github.com/laurent22/joplin/pull/3983#issue-509624899
- New: API: Adds ability to paginate data (#3983)
- Fixed: Display proper error message when decryption worker cannot be started (#4000)
- Fixed: Fixed OneDrive authentication
- Fixed: Fixed sync issue when importing ENEX files that contain new line characters in the source URL attribute (#3955)
## [cli-v1.3.3](https://github.com/laurent22/joplin/releases/tag/cli-v1.3.3) - 2020-10-23T16:00:38Z
- Improved: Added support for a custom S3 URL (#3921) (#3691 by [@aaron](https://github.com/aaron))