Solvedvscodium Auto Updating Support

How does auto updating works here? how are we pushing the new update?

also anyone has idea about how to configure custom update.channel?

32 Answers

✔️Accepted Answer

In case anyone want's to do it with a simple bash-"script", that you can trigger as often as you like...

wget -q -O /tmp/vscodium.deb $(wget -O- -q https://api.github.com/repos/VSCodium/vscodium/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep "amd64.deb") && sudo apt -f install /tmp/vscodium.deb && rm /tmp/vscodium.deb

Note: This Only supports dpkg/apt and amd64... :-)

Other Answers:

I was successfully auto-updated on my Mac using the new service 🎉

Testing steps:

  • downloaded an old version (1.33.0) of VSCodium
  • edited product.json to include quality: stable, updateUrl: vscodium.now.sh, and releaseNotesUrl: https://go.microsoft.com/fwlink/?LinkID=533483#vscode (so that updates are not silent)
  • signed the binary (since signing had not been implemented by 1.33.0)
  • opened the app and watched the Output | Log (Main) window
  • it hit the update API (which I could also see from the lambda logs), determined it was out of date, and downloaded the new file
  • I closed/reopened the app and found that I was on version 1.34.0

I updated the project to include adding releaseNotesUrl to the product.json pre-build.

Notes on Linux: I don't know if anyone has had experience with autoupdates on Linux, but since the API returns the tar.gz file link, I am doubtful that it autoupdates. I think with the introduction of the snap package things might have changed, but VSCodium hasn't gotten snap support figured out yet. If anyone has more information about how it works, please comment.

Good news -- I updated the version updater to support Windows and then tested auto updating on a Windows machine (x64, user install) -- it worked 🎉

Next step according to the project is to add two fields to the product.json file and then call it a day (wait for the next MS release). Actually will have to wait for two more MS releases -- the first will make VSCodium start checking for updates, the second will be a new version that VSCodium downloads + installs.

Absolutely, @batjko. This is definitely something that should be near the top of the priority list as it is a big shortcoming of VSCodium as compared to VSC.

Some more notes to keep the ball rolling and so I don't forget:

  • the full URL used to check for updates is ${product.updateUrl}/api/update/${platform}/${quality}/${product.commit}, where product.<value> comes from the product.json file
  • product.commit is populated automatically at build time (properly)
  • platform can be darwin, linux-<arch>, win32-[x64]-<archive|user>
  • we aren't currently setting quality and if it isn't set, all the update logic is disabled
  • we can't use a JSON file because response codes are important to this process
    • vscode uses Electron's autoupdater for Mac updates and custom logic for Windows + Linux. All three are expecting 200 if it should download an update and 204 if it shouldn't. On 200, the client expects the JSON blob (this accords with Squirrel, the underlying tech in Electron's autoupdater)
    • this can be seen with the current update API update.code.visualstudio.com (51b0b28134d51361cf996d2f0a1c698247aeabd8 is the commit hash of 1.33.1 in the vscode repo):
    $ curl -I https://update.code.visualstudio.com/api/update/darwin/stable/51b0b28134d51361cf996d2f0a1c698247aeabd8
    HTTP/1.1 204 No Content
    [...]
    $ curl -I https://update.code.visualstudio.com/api/update/darwin/stable/anythingelse
    HTTP/1.1 200 OK
    [...]

So might need to stand up a small update server to handle the details.

More Issues: