Slid For Desktop
npm install slid_desktopSetting up the web
- git clone https://github.com/Slid-Team/slid_web.git
- cd slid_webgit checkout develop
- npm install
- npm start
-
Setting up the desktop repo
- git clone https://github.com/Slid-Team/slid_desktop.gitcd slid_desktop
- git checkout develop
- npm install
- npm start
- (Install yarn by npm install --global yarn if necessary.)
- [ ] Merge all changes into develop branchversion.js
- [ ] Update the version in the following files:
- [ ] version2.js
- [ ] package.json
- [ ] forge.config.js packagerConfig.makers
- [ ] src/windows/primaryWindow
- [ ] dev & prod html files title, and iframe source urlsrc/env.json
- [ ] update all versionsnpm install
- [ ] do to update package-lock.json fileslid_web
- [ ] Test in development mode
- [ ] Deploy the corresponding changes in if anysrc/env.json
- [ ] In change to production mode and test
- [ ] Switch back to develeopment branch mode commit any changes you may have done if any
- [ ] Create a release branch off develop branch ex: git checkout -b release/1.0.0 develeopmain.js
- [ ] In change ENV to production modegit commit -m "releasing version 1.0.0"
- [ ] Commit git tag 1.0.0
- [ ] Make a release tag git push origin 1.0.0
- [ ] Push the tag
- [ ] Push to the remote release branch git push origin release/1.0.0
- [ ] merge the release branch into the master branch
- [ ] Make a build npm run make
On Windows
- [ ] Connect the EV Codesigning certificate usb
- [ ] Launch the command line: hit the windows button, type cmd and hit enter
- [ ] Navigate to the codesign tool by doing: cd C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86
- [ ] Code sign the executable: signtool.exe sign /s my "C:\Users\USER\Desktop\workspace\slid_desktop\out\make\squirrel.windows\x64\Slid-0.0.3 Setup.exe" (your path may be different)
- [ ] You will be prompted to enter the codesigning password (refer to notion doc for it)
- [ ] Verify that your build was signed: signtool.exe verify /v /pa "C:\Users\USER\Desktop\workspace\slid_desktop\out\make\squirrel.windows\x64\Slid-0.0.3 Setup.exe"
Additional Steps On Mac
- On Mac we wanna build in a zip format as it si the only format that will support auto updates
- Begin by creating a new branch: git checkout -b release/mac/1.0.0 develop
- In main.js change ENV to production mode
- Make the necessary changes to make sure the version works well on Mac
- Push all changes
- merge the release branch into the master branch
- Do npm run make
- Navigate to out/make/zip/darwin/x64 there you will find a zip build, we need to unzip that: then sign and notarize the Slid.app inside it, and then put it back
- unzip the file and sign the .app as follows: electron-osx-sign ./out/make/zip/darwin/x64/Slid.app --entitlements=./entitlements.plist --entitlements-inherit=./entitlements.plist --hardened-runtime --identity="Developer ID Application" --platform=darwin --provisioning-profile=./slid_desktop.provisionprofile
- The proceed to notarize it by running the notarize script: node notarize.js
- Now you have a signed and notarized Slid.app
- delete the old .zip and compress the signed .app to make a new zip with exactly the same name as the original one
- We will upload the .zip file on github, and on s3
- As always test everything before deploying
- [ ] Uninstall the previous version of slid that may be installed on your machine
- [ ] Install the new signed build, check if installation goes well, and test all functionalities
- [ ] Navigate to the public release repository
- [ ] Click on releases, then draft new release
- [ ] Add the correct tag version; (should always be in format v1.1.1)
- [ ] Keep release target to main
- [ ] For the release title simple use the same as tag version
- [ ] For description, describe briefly which changes this new release introduce
- [ ] Drag and drop the build artifacts into the "attach binary" section
1. Fow windows: out/make/squirrel.windows/x64 all the 3 files inside
2. For mac: (coming soon)
- [ ] Click Publish release
- [ ] Navigate to aws s3
- [ ] go to slid_desktop_builds/ and click upload
- [ ] drag and drop the signed executable
- [ ] Go to permissions -> Predefined ACLs -> Grant public-read access and tick the box, as well as the confirmation box
- [ ] Navigate to firebase remote config
- [ ] Edit the feature flag by only changing the slid_desktop_version and save the changes
- [ ] Download the new version from slid website and test it
- [ ] Test if previous versions run well and update after 5 minutes of activity
#### Congratulations !!!
You have deployed a new version and all of sudden you realize that users are having issues with it, here are the steps to take:
1. Prevent Installed Apps from updating to the problematic version by going to the public release repository, edit the problematic release by ticking the box that sets it as a pre-release and save updates
2. Prevent further downloads of the problematic version by going to firebase remote config and changing the desktop version to the last version that worked well.
1. Check is the problem is happening both on Mac and Windows
2. If the problem is with both OS:
- Open the open the codebases: slid_desktop and slid_web
- Start slid_web master branch
- In slid_desktop checkout to the branch that was used to build the problematic version (format: release/1.0.0)
- In main.js chance ENV to development
- npm startnpm start`
- Start debugging the issue
3. If the issue is Mac Only:
- Open the open the codebases: slid_desktop and slid_web
- Start slid_web master branch
- In slid_desktop checkout to the branch that was used to build the problematic version (format: release/mac/1.0.0)
- In main.js chance ENV to development
-
- Start debugging the issue
- For Mac you will need to package the app in order for some features to work (ex: authentication)
1. Follow the standard procedure for making a new release in slid_web repo
2. Tell the users who experience the issue to go to view --> Clear Cache for the new iframe code to be loaded
3. If the problem is too nasty it may be better to just make a whole new desktop version so that even the silent users will have theit apps updates and pick up web changes
1. Make a whole new release following the procedure mentioned in this file