From 40f6dcfb4c9d06f2a2f42919235159f02a8ffd20 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 26 Nov 2020 19:42:05 +0000 Subject: [PATCH] Android release 1.4 --- README.md | 2 +- packages/app-mobile/android/app/build.gradle | 4 ++-- packages/tools/release-android.js | 23 +++++--------------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index fdc124ed5..ae7c3d9b0 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Linux | Get it on Google Play | or download the APK file: [64-bit](https://github.com/laurent22/joplin-android/releases/download/android-v1.3.13/joplin-v1.3.13.apk) [32-bit](https://github.com/laurent22/joplin-android/releases/download/android-v1.3.13/joplin-v1.3.13-32bit.apk) +Android | Get it on Google Play | or download the APK file: [64-bit](https://github.com/laurent22/joplin-android/releases/download/android-v1.4.11/joplin-v1.4.11.apk) [32-bit](https://github.com/laurent22/joplin-android/releases/download/android-v1.4.11/joplin-v1.4.11-32bit.apk) iOS | Get it on the App Store | - ## Terminal application diff --git a/packages/app-mobile/android/app/build.gradle b/packages/app-mobile/android/app/build.gradle index d0306f7cc..712735f4e 100644 --- a/packages/app-mobile/android/app/build.gradle +++ b/packages/app-mobile/android/app/build.gradle @@ -138,8 +138,8 @@ android { applicationId "net.cozic.joplin" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 2097608 - versionName "1.4.6" + versionCode 2097613 + versionName "1.4.11" ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } diff --git a/packages/tools/release-android.js b/packages/tools/release-android.js index be716bdf2..6f708a5d2 100644 --- a/packages/tools/release-android.js +++ b/packages/tools/release-android.js @@ -5,21 +5,10 @@ const fetch = require('node-fetch'); const uriTemplate = require('uri-template'); const projectName = 'joplin-android'; -const rnDir = `${__dirname}/../../packages/app-mobile`; -const rootDir = path.dirname(__dirname); +const rootDir = path.dirname(path.dirname(__dirname)); +const rnDir = `${rootDir}/packages/app-mobile`; const releaseDir = `${rnDir}/dist`; -// function wslToWinPath(wslPath) { -// const s = wslPath.split('/'); -// if (s.length < 3) return s.join('\\'); -// s.splice(0, 1); -// if (s[0] !== 'mnt' || s[1].length !== 1) return s.join('\\'); -// s.splice(0, 1); -// s[0] = `${s[0].toUpperCase()}:`; -// while (s.length && !s[s.length - 1]) s.pop(); -// return s.join('\\'); -// } - function increaseGradleVersionCode(content) { const newContent = content.replace(/versionCode\s+(\d+)/, function(a, versionCode) { const n = Number(versionCode); @@ -128,11 +117,11 @@ async function createRelease(name, tagName, version) { await fs.mkdirp(releaseDir); console.info(`Copying APK to ${apkFilePath}`); - await fs.copy('app-mobile/android/app/build/outputs/apk/release/app-release.apk', apkFilePath); + await fs.copy(`${rnDir}/android/app/build/outputs/apk/release/app-release.apk`, apkFilePath); if (name === 'main') { console.info(`Copying APK to ${releaseDir}/joplin-latest.apk`); - await fs.copy('app-mobile/android/app/build/outputs/apk/release/app-release.apk', `${releaseDir}/joplin-latest.apk`); + await fs.copy(`${rnDir}/android/app/build/outputs/apk/release/app-release.apk`, `${releaseDir}/joplin-latest.apk`); } for (const filename in originalContents) { @@ -170,10 +159,10 @@ async function main() { if (!isPreRelease) { console.info('Updating Readme URL...'); - let readmeContent = await fs.readFile('README.md', 'utf8'); + let readmeContent = await fs.readFile(`${rootDir}/README.md`, 'utf8'); readmeContent = readmeContent.replace(/(https:\/\/github.com\/laurent22\/joplin-android\/releases\/download\/android-v\d+\.\d+\.\d+\/joplin-v\d+\.\d+\.\d+\.apk)/, releaseFiles['main'].downloadUrl); readmeContent = readmeContent.replace(/(https:\/\/github.com\/laurent22\/joplin-android\/releases\/download\/android-v\d+\.\d+\.\d+\/joplin-v\d+\.\d+\.\d+-32bit\.apk)/, releaseFiles['32bit'].downloadUrl); - await fs.writeFile('README.md', readmeContent); + await fs.writeFile(`${rootDir}/README.md`, readmeContent); } await execCommandVerbose('git', ['pull']);