1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Tools: Restored CLI release script

This commit is contained in:
Laurent Cozic 2020-11-06 21:25:07 +00:00
parent 7b0122a8db
commit 553bbfc818
6 changed files with 25 additions and 11 deletions

View File

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

View File

@ -10,15 +10,23 @@ const tasks = {
// updateIgnoredTypeScriptBuild: require('../Tools/gulp/tasks/updateIgnoredTypeScriptBuild'), // 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 = { tasks.prepareBuild = {
fn: async () => { fn: async () => {
const buildDir = `${__dirname}/build`; const buildDir = `${__dirname}/build`;
await utils.copyDir(`${__dirname}/app`, buildDir, { await utils.copyDir(`${__dirname}/app`, buildDir, {
excluded: ['node_modules'], 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 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}/package-lock.json`, `${buildDir}/package-lock.json`);
await utils.copyFile(`${__dirname}/gulpfile.js`, `${buildDir}/gulpfile.js`); await utils.copyFile(`${__dirname}/gulpfile.js`, `${buildDir}/gulpfile.js`);

View File

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

View File

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

View File

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

View File

@ -1,5 +1,14 @@
# Joplin terminal app changelog # 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 ## [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)) - Improved: Added support for a custom S3 URL (#3921) (#3691 by [@aaron](https://github.com/aaron))