Skip to content

Commit

Permalink
Prepare for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed May 14, 2021
1 parent 81884cf commit 321a58c
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 32 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"license": "MIT",
"scripts": {
"audit": "lerna-audit",
"bootstrap": "lerna bootstrap --no-ci",
"bootstrapIgnoreScripts": "lerna bootstrap --ignore-scripts --no-ci",
"bootstrapServerOnly": "lerna bootstrap --no-ci --include-dependents --include-dependencies --scope @joplin/server",
"bootstrap": "lerna bootstrap --force-local --no-ci",
"bootstrapServerOnly": "lerna bootstrap --force-local --no-ci --include-dependents --include-dependencies --scope @joplin/server",
"build": "lerna run build && npm run tsc",
"buildApiDoc": "npm start --prefix=packages/app-cli -- apidoc ../../readme/api/references/rest_api.md",
"buildDoc": "./packages/tools/build-all.sh",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
],
"owner": "Laurent Cozic"
},
"version": "1.8.1",
"version": "2.0.0",
"bin": {
"joplin": "./main.js"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/app-clipper/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Joplin Web Clipper [DEV]",
"version": "1.8.0",
"version": "2.0.0",
"description": "Capture and save web pages and screenshots from your browser to Joplin.",
"homepage_url": "https://joplinapp.org",
"content_security_policy": "script-src 'self'; object-src 'self'",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joplin/app-desktop",
"version": "1.8.5",
"version": "2.0.0",
"description": "Joplin for Desktop",
"main": "main.js",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/app-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2097631
versionName "1.8.5"
versionName "2.0.0"
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
INFOPLIST_FILE = Joplin/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 10.8.1;
MARKETING_VERSION = 20.0.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -519,7 +519,7 @@
INFOPLIST_FILE = Joplin/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 10.8.1;
MARKETING_VERSION = 20.0.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -666,7 +666,7 @@
INFOPLIST_FILE = ShareExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 10.8.1;
MARKETING_VERSION = 20.0.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = net.cozic.joplin.ShareExtension;
Expand Down Expand Up @@ -697,7 +697,7 @@
INFOPLIST_FILE = ShareExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 10.8.1;
MARKETING_VERSION = 20.0.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = net.cozic.joplin.ShareExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"id": "<%= pluginId %>",
"app_min_version": "1.8",
"app_min_version": "2.0",
"version": "1.0.0",
"name": "<%= pluginName %>",
"description": "<%= pluginDescription %>",
Expand Down
4 changes: 2 additions & 2 deletions packages/generator-joplin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-joplin",
"version": "1.8.1",
"version": "2.0.0",
"description": "Scaffolds out a new Joplin plugin",
"homepage": "https://github.com/laurent22/joplin/tree/dev/packages/generator-joplin",
"author": {
Expand Down Expand Up @@ -34,4 +34,4 @@
"repository": "https://github.com/laurent22/generator-joplin",
"license": "MIT",
"private": true
}
}
2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joplin/lib",
"version": "1.8.2",
"version": "2.0.0",
"description": "Joplin Core library",
"author": "Laurent Cozic",
"homepage": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-repo-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joplin/plugin-repo-cli",
"version": "1.8.2",
"version": "2.0.0",
"description": "",
"main": "index.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joplin/renderer",
"version": "1.8.2",
"version": "2.0.0",
"description": "The Joplin note renderer, used the mobile and desktop application",
"repository": "https://github.com/laurent22/joplin/tree/dev/packages/renderer",
"main": "index.js",
Expand Down
10 changes: 10 additions & 0 deletions packages/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,13 @@ From `packages/server`, run `npm run start-dev`
# Changelog

[View the changelog](https://github.com/laurent22/joplin/blob/dev/readme/changelog_server.md)

# License

Copyright (c) 2017-2021 Laurent Cozic

Personal Use License

Joplin Server is available for personal use only. For example you may host the software on your own server for non-commercial activity.

To obtain a license for commercial purposes, please contact us.
2 changes: 1 addition & 1 deletion packages/server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joplin/server",
"version": "1.8.0",
"version": "2.0.1",
"private": true,
"scripts": {
"start-dev": "nodemon --config nodemon.json dist/app.js --env dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joplin/tools",
"version": "1.8.2",
"version": "2.0.0",
"description": "Various tools for Joplin",
"main": "index.js",
"author": "Laurent Cozic",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/release-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function main() {

await execCommand2('npm publish');

await completeReleaseWithChangelog(changelogPath, newVersion, newTag, 'CLI');
await completeReleaseWithChangelog(changelogPath, newVersion, newTag, 'CLI', false);
}

main().catch((error) => {
Expand Down
16 changes: 11 additions & 5 deletions packages/tools/release-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,29 @@ import { execCommand2, rootDir, gitPullTry, completeReleaseWithChangelog } from
const serverDir = `${rootDir}/packages/server`;

async function main() {
const argv = require('yargs').argv;
if (!['release', 'prerelease'].includes(argv.type)) throw new Error('Must specify release type. Either --type=release or --type=prerelease');
const isPreRelease = argv.type === 'prerelease';

await gitPullTry();

process.chdir(serverDir);
const version = (await execCommand2('npm version patch')).trim();
const versionShort = version.substr(1);
const imageVersion = versionShort + (isPreRelease ? '-beta' : '');
const tagName = `server-${version}`;

process.chdir(rootDir);
console.info(`Running from: ${process.cwd()}`);

await execCommand2(`docker build -t "joplin/server:${versionShort}" -f Dockerfile.server .`);
await execCommand2(`docker tag "joplin/server:${versionShort}" "joplin/server:latest"`);
await execCommand2(`docker push joplin/server:${versionShort}`);
await execCommand2('docker push joplin/server:latest');
await execCommand2(`docker build -t "joplin/server:${imageVersion}" -f Dockerfile.server .`);
await execCommand2(`docker tag "joplin/server:${imageVersion}" "joplin/server:latest"`);
await execCommand2(`docker push joplin/server:${imageVersion}`);

if (!isPreRelease) await execCommand2('docker push joplin/server:latest');

const changelogPath = `${rootDir}/readme/changelog_server.md`;
await completeReleaseWithChangelog(changelogPath, version, tagName, 'Server');
await completeReleaseWithChangelog(changelogPath, version, tagName, 'Server', isPreRelease);
}

main().catch((error) => {
Expand Down
13 changes: 7 additions & 6 deletions packages/tools/tool-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function commandToString(commandName: string, args: string[] = []) {
return output.join(' ');
}

async function insertChangelog(tag: string, changelogPath: string, changelog: string) {
async function insertChangelog(tag: string, changelogPath: string, changelog: string, isPrerelease: boolean) {
const currentText = await fs.readFile(changelogPath, 'UTF-8');
const lines = currentText.split('\n');

Expand All @@ -46,10 +46,11 @@ async function insertChangelog(tag: string, changelogPath: string, changelog: st
const header = [
'##',
`[${tag}](https://github.com/laurent22/joplin/releases/tag/${tag})`,
'-',
// eslint-disable-next-line no-useless-escape
`${moment.utc().format('YYYY-MM-DD\THH:mm:ss')}Z`,
];
if (isPrerelease) header.push('(Pre-release)');
header.push('-');
// eslint-disable-next-line no-useless-escape
header.push(`${moment.utc().format('YYYY-MM-DD\THH:mm:ss')}Z`);

let newLines = [];
newLines.push(header.join(' '));
Expand All @@ -62,10 +63,10 @@ async function insertChangelog(tag: string, changelogPath: string, changelog: st
return output.join('\n');
}

export async function completeReleaseWithChangelog(changelogPath: string, newVersion: string, newTag: string, appName: string) {
export async function completeReleaseWithChangelog(changelogPath: string, newVersion: string, newTag: string, appName: string, isPreRelease: boolean) {
const changelog = (await execCommand2(`node ${rootDir}/packages/tools/git-changelog ${newTag}`, { })).trim();

const newChangelog = await insertChangelog(newTag, changelogPath, changelog);
const newChangelog = await insertChangelog(newTag, changelogPath, changelog, isPreRelease);

await fs.writeFile(changelogPath, newChangelog);

Expand Down
10 changes: 10 additions & 0 deletions readme/changelog_server.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Joplin Server Changelog

## [server-v2.0.1](https://github.com/laurent22/joplin/releases/tag/server-v2.0.1) (Pre-release) - 2021-05-14T13:55:45Z

- New: Add support for sharing notes via a link (ccbc329)
- New: Add support for sharing a folder (#4772)
- New: Added log page to view latest changes to files (874f301)
- Fixed: Prevent new user password from being hashed twice (76c143e)
- Fixed: Fixed crash when rendering note with links to non-existing resources or notes (07484de)
- Fixed: Fixed error handling when no session is provided (63a5bfa)
- Fixed: Fixed uploading empty file to the API (#4402)

## [server-v1.7.2](https://github.com/laurent22/joplin/releases/tag/server-v1.7.2) - 2021-01-24T19:11:10Z

- Fixed: Fixed password hashing when changing password
Expand Down

0 comments on commit 321a58c

Please sign in to comment.