From b8d5e58f0da131f1ddca2c1939d4b297039d88c0 Mon Sep 17 00:00:00 2001 From: Thomas Rich Date: Wed, 28 Apr 2021 10:58:02 -0700 Subject: [PATCH] updating readme and bumping version; commenting out --linux from build process for now (it still seems to generate an appImage even without that but just doesn't publish to snapcraft) --- README.md | 66 ++++++++++++++++++++++++++++++++++++---------------- package.json | 12 ++++++++-- 2 files changed, 56 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 6eba4ec..ffc6e60 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,34 @@ ![image](https://user-images.githubusercontent.com/2730609/67169732-df3ca800-f348-11e9-8003-baa91cd8cfec.png) # ove-electron + This packages the open-vector-editor web app as an electron tool that can be used on windows/mac/linux ![image](https://user-images.githubusercontent.com/2730609/67169717-c59b6080-f348-11e9-995a-89b7213428ff.png) -# Installation Instructions: - - Go to https://github.com/tnrich/ove-electron/releases and find the latest release for the platform you're on (win/mac/linux) - - mac -- download the DMG file and double click to install it - - windows -- download the .exe file and double click to install it - - linux -- download the .AppImage file and open a terminal. Run: - ``` - chmod +x Open-Vector-Editor-0.1.5.AppImage +# Installation Instructions: + +- Go to https://github.com/tnrich/ove-electron/releases and find the latest release for the platform you're on (win/mac/linux) +- mac -- download the DMG file and double click to install it +- windows -- download the .exe file and double click to install it +- linux -- download the .AppImage file and open a terminal. Run: + +``` +chmod +x Open-Vector-Editor-0.1.5.AppImage ./Open-Vector-Editor-0.1.5.AppImage - ``` +``` + +# Developing -# Developing ``` yarn yarn start ``` + ## To speed up trying out changes from OVE + ``` -cd open-vector-editor; +cd open-vector-editor; yarn link; cd ove-electron; yarn link open-vector-editor @@ -35,33 +41,53 @@ cd open-vector-editor; yarn build; //this will now build only the UMD file that ove-electron uses ``` -# Releasing - - Bump the package.json version number - - Build windows and mac +# Releasing + +These environment variables will need to be set in a local .env file: + +``` +APPLEID=yourstringhere //my apple id +//this needs to be an app-specific password (not just my apple password) https://appleid.apple.com/account/manage +APPLEIDPASS=yourstringhere +GH_TOKEN=yourstringhere +``` + +- Bump the package.json version number +- Build windows and mac + ``` yarn deploy ``` + wait for it to finish - - Go to https://github.com/tnrich/ove-electron/releases - - Edit the most recently pushed release to publish it - - Commit changes - - yarn generateChangelog +- Go to https://github.com/tnrich/ove-electron/releases +- Edit the most recently pushed release to publish it +- Keep the blockmap and latest.yml files as they are used by the auto-updater +- Commit changes +- yarn generateChangelog ## Troubleshooting release process + How auto-updating works : https://medium.com/@johndyer24/creating-and-deploying-an-auto-updating-electron-app-for-mac-and-windows-using-electron-builder-6a3982c0cee6 If apple notarize isn't working, this can help to troubleshoot: https://stackoverflow.com/questions/58358449/notarizing-electron-apps-throws-you-must-first-sign-the-relevant-contracts-on -If you're seeing this error: +If you're seeing an itunes signing in error, maybe the app specific password needs to be updated: +https://david.dev/how-to-notarize-your-electron-app + +If you're seeing this error: The request is missing an Authorization header field containing a valid macaroon You'll need to re-login to snapcraft.io (credentials under ubuntu.com) + ``` snapcraft login ``` # Testing -I've set up a single spectron test under /test -Unfortunately spectron doesn't support interacting with native dialogs so I'd need to mock those to have the tests be at all useful. I should probably do this sometime down the line. \ No newline at end of file + +I've set up a single spectron test under /test +It can be run via `yarn test` +Unfortunately spectron doesn't support interacting with native dialogs so I'd need to mock those to have the tests be at all useful. I should probably do this sometime down the line. (note OVE itself is close to full test coverage https://github.com/TeselaGen/openVectorEditor) diff --git a/package.json b/package.json index 68f3a07..f4a5968 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ove-electron", - "version": "1.1.0", + "version": "1.1.1", "description": "An open source vector/plasmid editor", "main": "main.js", "scripts": { @@ -9,7 +9,8 @@ "build": "env-cmd electron-builder -wml --publish never", "build-win": "env-cmd electron-builder --win --publish never", "build-mac": "env-cmd electron-builder --mac --publish never", - "deploy": "env-cmd electron-builder --mac --windows --linux --publish always", + "_deploy": "env-cmd electron-builder --mac --windows --linux --publish always", + "deploy": "env-cmd electron-builder --mac --windows --publish always", "deploy-win": "env-cmd electron-builder --win --publish always", "deploy-mac": "env-cmd electron-builder --mac --publish always", "deploy-linux": "env-cmd electron-builder --linux --publish always", @@ -26,6 +27,13 @@ "mac": { "hardenedRuntime": true, "gatekeeperAssess": false, + "target": { + "target": "default", + "arch": [ + "x64", + "arm64" + ] + }, "entitlements": "src/misc/entitlements.mac.plist", "entitlementsInherit": "src/misc/entitlements.mac.plist" },