From edfd2c4d54c98547ad9210799ec31764bc0c558f Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 24 Feb 2019 17:26:46 +0000 Subject: [PATCH] Desktop: Updated build process to fix buggy electron-builder https://github.com/electron-userland/electron-builder/issues/3660#issuecomment-465461491 --- ElectronClient/app/package-lock.json | 18 +++++++++--------- ElectronClient/app/package.json | 7 ++++--- Tools/release-android.js | 2 ++ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/ElectronClient/app/package-lock.json b/ElectronClient/app/package-lock.json index f92709d61..f0bd2234b 100644 --- a/ElectronClient/app/package-lock.json +++ b/ElectronClient/app/package-lock.json @@ -29,9 +29,9 @@ "optional": true }, "@types/node": { - "version": "10.12.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.26.tgz", - "integrity": "sha512-nMRqS+mL1TOnIJrL6LKJcNZPB8V3eTfRo9FQA2b5gDvrHurC8XbSA86KNe0dShlEL7ReWJv/OU9NL7Z0dnqWTg==", + "version": "10.12.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.27.tgz", + "integrity": "sha512-e9wgeY6gaY21on3ve0xAjgBVjGDWq/xUteK0ujsE53bUoxycMkqfnkUgMt6ffZtykZ5X12Mg3T7Pw4TRCObDKg==", "dev": true }, "abab": { @@ -2070,9 +2070,9 @@ "dev": true }, "electron": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/electron/-/electron-4.0.4.tgz", - "integrity": "sha512-zG5VtLrmPfmw1fXY/3BEtRZk7OZ7djQhweZ6rW+R5NeF6s8RTz/AwTGtLoBo4z8wmJ5QTy0Y941FZw4pe5YlpA==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/electron/-/electron-4.0.5.tgz", + "integrity": "sha512-UWFH6SrzNtzfvusGUFYxXDrgsUEbtBXkH/66hpDWxjA2Ckt7ozcYIujZpshbr7LPy8kV3ZRxIvoyCMdaS5DkVQ==", "dev": true, "requires": { "@types/node": "^10.12.18", @@ -2391,9 +2391,9 @@ "dev": true }, "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { "is-arrayish": "^0.2.1" diff --git a/ElectronClient/app/package.json b/ElectronClient/app/package.json index 825562129..4b4f4592e 100644 --- a/ElectronClient/app/package.json +++ b/ElectronClient/app/package.json @@ -6,9 +6,9 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "pack": "node_modules/.bin/electron-builder --dir", - "dist": "node_modules/.bin/electron-rebuild && node_modules/.bin/electron-builder", + "dist": "node_modules/.bin/electron-builder", "publish": "build -p always", - "postinstall": "node compile.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts && install-app-deps", + "postinstall": "node compile.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts && node_modules/.bin/electron-rebuild", "compile": "node compile.js && node compile-package-info.js && node ../../Tools/copycss.js --copy-fonts" }, "repository": { @@ -22,6 +22,7 @@ }, "build": { "appId": "net.cozic.joplin-desktop", + "npmRebuild": false, "extraResources": [ "build/icons/*" ], @@ -70,7 +71,7 @@ "app-builder-bin": "^1.9.11", "babel-cli": "^6.26.0", "babel-preset-react": "^6.24.1", - "electron": "^4.0.4", + "electron": "4.0.5", "electron-builder": "20.38.5", "electron-rebuild": "^1.8.4" }, diff --git a/Tools/release-android.js b/Tools/release-android.js index d7c9607ec..67181c07c 100644 --- a/Tools/release-android.js +++ b/Tools/release-android.js @@ -84,6 +84,8 @@ async function main() { console.info('Copying APK to ' + apkFilePath); await fs.copy('ReactNativeClient/android/app/build/outputs/apk/release/app-release.apk', apkFilePath); + console.info('Copying APK to ' + releaseDir + '/joplin-latest.apk'); + await fs.copy('ReactNativeClient/android/app/build/outputs/apk/release/app-release.apk', releaseDir + '/joplin-latest.apk'); console.info('Updating Readme URL...');