LOLINTERNETZ / vscodeoffline

Enables Visual Studio Code's extension gallery to be used in offline (air-gapped) environments. Or, run your own gallery!
https://hub.docker.com/u/lolinternet
MIT License
96 stars 28 forks source link

Update Versions dictionary can't hold both stable and insider builds #2

Closed almostjulian closed 4 years ago

almostjulian commented 5 years ago

Hey, one more thing now that I know you're alive :)

It looks like the updates dictionary that holds all the VS Code binary versions can't hold both stable and insider builds at the same time (the insider version just overwrites the key). Suggest you bake in quality as well into the identity?

LOLINTERNETZ commented 4 years ago

Aren't the stable and insider builds separated out, at least for the binaries? At least from 1.0.8 onwards... e.g.

almostjulian commented 4 years ago

The versions dictionary that gets built when the sync job check for new binaries is effectively {platform}-{architecture}-{buildtype}. Quality isn't part of the identity, so it doesn't download the stable version, if sync everything is enabled, just the insider version.

For example: There's a win32 binaryboth stable and insider builds. but there's only one entry for versions[win32], so only the insider build gets downloaded (the last one "win32" entry to get set).

ttutko commented 4 years ago

I submitted a PR to resolve this issue. It was a pretty simple fix.

@LOLINTERNETZ thanks for this excellent project. I haven't gotten to test the offline side of it yet but the online side is great. I need something like this for NuGet too and may use this as a starting point.

almostjulian commented 4 years ago

Thanks @ttutko would have done the same if I was allowed to by my company :(

LOLINTERNETZ commented 4 years ago

Awesome!! Thank you @ttutko for resolving the issue and @darkonejr for making it an easy fix. I've just merged it with master and cut 1.0.12.

No problems too. I've been thinking of using it as a pattern for some other projects too, offline NuGet would be amazing! I think Artifactory might have some functionality within it but I haven't tried it. Plus it's mega dollars.

Keep in touch!