How does auto updating works here? how are we pushing the new update?
also anyone has idea about how to configure custom update.channel?
Use the deb repository. See the README.
The deb repository might be a good idea for Linux users. For Mac users we will have to figure something else out. It's not the best experience having to check the repo for updates or ask brew for updates. This could use some discussion.
Homebrew can auto-update. Even in Debian, auto-updates do not happen automatically. You still have to type sudo apt-get update && sudo apt-get upgrade.
But is it possible to get something like this native update notification?

There must be a way to configure update channel, isn't it?
I think we can get something like that working. I need to investigate out it currently works in vscode
Yes, there must be a proper interface for that feature, we need to check how to configure the same. I'll see if I can figure out something.
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... :-)
Out of personal interesst I looked into the source of the updater-mechanism...
It seems that the update mechanisms hits this URL. See the following folder for the concrete implementation of the updater-service. the abstract implementation contains the basic URL-schemantics for all platforms and the actual "update-checking" happens in the platform-specific implementations.
https://github.com/Microsoft/vscode/tree/master/src/vs/platform/update/electron-main
I'd probably try to change the update-url in the gulp-build-process to localhost or similar and would see what gets requested and try to respond...
Found some more resources when opened Applications ▸ Visual Studio Code ▸ Show package contents(Right click) ▸ Contents ▸ Resources ▸ app ▸ product.json on OSX VSCode.
The product.json file has all the information about the build.
Update points to https://vscode-update.azurewebsites.net and these are the update urls.
https://vscode-update.azurewebsites.net/api/update/darwin/stable/VERSION
https://vscode-update.azurewebsites.net/api/update/darwin/insider/VERSION
If we can configure custom update URL & replicate above response format, things should probably work?
I would guess so as well. I know that you can host static pages on github (??repo??.github.io or something...)
Maye on each build push a file with the necessary information into the repo-root and host it directly from github itself?
Yup, that should work. As far as I know build folder of VSCode repo should have most of the necessary scripts to make it work.
Will investigate further.
I know that you can host static pages on github
We can just host the one json directly in vscodium repo.
@ganapativs @tynx thank you both for digging in. Yes-- this is perfect, we can easily host a JSON file that has the latest version with its hash and download link in the repo and update it at build time. When I have a few minutes I'll dig in, but PRs are welcome in the meantime. Again thank you all for digging in, as this is a piece of the vscodium puzzle that was really in need of solving 👍
Circling back to this today... I think the next steps are:
version , hash, and sha256hashI'll start investigating
Another step is that updates apparently won't work unless the app is signed. I'm not sure how to sign the app during Travis build so that is something I've got to figure out.
Another step is that updates apparently won't work unless the app is signed.
Is it verified? Someone tried it?
We don't sign VSCodium build as of now right?
@ganapativs vscode uses electron's autoupdater functionality, and the electron docs here say the app needs to be signed for Mac OS.
We don't currently sign the builds. Do you know how to do this in an safe automated way?
@stripedpajamas Okay, I don't know much about signing desktop apps, but found this electron code signing resource, which might help.
Also, not to be pedantic, but Windows users would surely also appreciate the ability, as they have had it for Standard vsc.
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.
Hello!
As a new VSCodium user (awesome project) just my two cents, this functionality is definitively needed! Hope you guys can figure it out :)
Some more notes to keep the ball rolling and so I don't forget:
${product.updateUrl}/api/update/${platform}/${quality}/${product.commit}, where product.<value> comes from the product.json fileproduct.commit is populated automatically at build time (properly)platform can be darwin, linux-<arch>, win32-[x64]-<archive|user>quality and if it isn't set, all the update logic is disabled51b0b28134d51361cf996d2f0a1c698247aeabd8 is the commit hash of 1.33.1 in the vscode repo):bash
$ 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.
Ok I made some progress on this over the past couple of days. Here is an update:
bash
$ curl -I https://vscodium.now.sh/api/update/darwin/stable/some-bogus-commit-hash
HTTP/2 200
[...]
$ curl https://vscodium.now.sh/api/update/darwin/stable/some-bogus-commit-hash | jq
{
"url": "https://github.com/VSCodium/vscodium/releases/download/1.34.0/VSCodium-darwin-1.34.0.zip",
"name": "1.34.0",
"version": "a622c65b2c713c890fcf4fbf07cf34049d5fe758",
"productVersion": "1.34.0",
"hash": "768e876321bf52e337d5f05bc24f06246c8d1877",
"timestamp": "1558030458353",
"sha256hash": "b1c3fd7b421d8e97af7e0556956e0d19c06031526a92b3ca19b8103cd167455d"
}
$ curl -I https://vscodium.now.sh/api/update/darwin/stable/a622c65b2c713c890fcf4fbf07cf34049d5fe758
HTTP/2 204
[...]
$ curl https://vscodium.now.sh/api/update/darwin/stable/a622c65b2c713c890fcf4fbf07cf34049d5fe758
[no content]
Testing everything out is not intuitive, so I will probably have to write up a Contributing Guide pretty soon that covers VSCodium, the update API, and the versions repo.
I will try to test it out with an older version of VSCodium and see how it responds to the API.
I was successfully auto-updated on my Mac using the new service 🎉
Testing steps:
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)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.
Check for update return server error 404.
Version: 1.35.0 (system setup)
Commit: db1afbd17a1c66db7ac8cf62a03d7b4db3aca70b
Date: 2019-06-11T04:56:38.833Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.18362

System setup updates are not supported. I'm not certain that they're supported by Microsoft either because it looked like the update code specified user or archive.
Yes, they are supported.
I also tried to install the user setup 1.35.0 for check the update of 1.35.1 and the message shown was that vscodium is already updated, it's normal? There even should be a "pop-up message" on bottom right side, like vscode, that alert me about an update?
Is this even supported on Linux with VSCode? When they request you update the software, it navigates you to https://code.visualstudio.com to download a deb / rpm, so I'm not sure if this can be done on Linux.
Most helpful comment
In case anyone want's to do it with a simple bash-"script", that you can trigger as often as you like...
Note: This Only supports dpkg/apt and amd64... :-)