Commit Graph

16 Commits

Author SHA1 Message Date
Sean Chalmers
9321785bab vscode-extensions: script to generate Nix for "latest" version of all installed vscode extensions
Added better practices to update_exts script.

Use `jq` instead of `grep` for more reliable JSON querying.

Check for 404 when requesting package.json information to avoid mangled
output.

Added proper failure points for missing vscode package, unknown version,
and if the code executable couldn't be found.

Switched to using a `nix-shell` shebang for even better reliability and
use the `sh` shell to be that little bit more generic.

Script is still clunky and sequential, anything more and I'd need to
write a proper program to do this and that's getting a bit silly? But
people that have a dozen or so extensions might be in for a long wait.

Be explicit about using bash

Improve the use of jq to remove unnecessary use of tr. Hat-tip coretemp.

Add some comments, finally.

Remove the `fetch` function.

Change the `get_ver` function to more accurately demonstrate what it is trying
to do, as well as add in some better error handling for non-200 http responses.

I couldn't make the bash `${param/search/replacement}` work for chopping up the
response in the `get_ver` function, hence the use of `sed`. Hopefully it all
makes a bit more sense now.

Remove github requests.

VSIXPackage is just a zip format in disguise so use a tmpdir and unpackage the
package.json file for the file in question so we can get the precise version
that we're interested in without additional redundant calls to github that may
not provide the right answer anyway.

Add trap to try to clean up the temp folders and clean up as we go.

I can't use 'fetchurl' or even 'nix-prefetch-url' because for the former we
don't yet know the hash that we're after and for the latter there isn't a way to
tie the predownloaded file into the next part of the workflow.

Prevent an unnecessary file from being extracted.

Change the unzip command to read the file we're after to stdout so we can use jq
on it directly instead of creating a file, reading it, then deleting it.

Courtesy of worldofpeace, remove the dependency on coreutils and use the
provided nix-hash function to generate the required hash.

Fix up a comment

Remove use of 'awk' and clean up individual Nix printing with cat to EOF expression.
2018-08-07 10:14:57 +10:00
Silvan Mosberger
56dd84bef7
Merge pull request #43829 from eadwu/vscode-extensions.ms-python.python/2018.7.0
vscode-extensions.ms-python.python: 2018.6.0 -> 2018.7.0
2018-07-24 23:37:42 +02:00
Jörg Thalheim
218298b30f
Merge branch 'master' into unused5 2018-07-21 15:41:22 +01:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
volth
6d2857a311 [bot] treewide: remove unused 'inherit' in let blocks 2018-07-20 19:38:19 +00:00
Edmund Wu
fa94354b98
vscode-extensions.ms-python.python: 2018.6.0 -> 2018.7.0 2018-07-19 15:15:34 -04:00
adisbladis
ebc6cd58be
Merge pull request #43167 from eadwu/vscode-extensions.ms-vscode.cpptools/0.17.6
vscode-extensions.ms-vscode.cpptools: 0.16.1 -> 0.17.6
2018-07-10 20:58:13 +08:00
Edmund Wu
a2986ad883
vscode-extensions.ms-vscode.cpptools: 0.16.1 -> 0.17.6 2018-07-07 21:53:58 -04:00
Edmund Wu
4ea0930f71
vscode-extensions.ms-python.python: 0.8.0 -> 2018.6.0 2018-07-07 21:53:11 -04:00
Raymond Gauthier
5146fad639 vscode-extension-ms-vscode-cpptools: 0.12.3 -> 0.16.1 2018-05-05 00:58:54 -04:00
Will Dietz
4f273627a1 tree-wide: fix instance of "meta.maintainer" -> "meta.maintainers"
Encountered one of these when using check-meta, did a quick
search to find other instances.
2018-04-19 10:41:12 -05:00
LightDiscord
dc48e68221
vscode: fix files with space(s) #39112 2018-04-18 19:07:05 +02:00
Raymond Gauthier
faf13b6794 vscode-extension-ms-python-python: Init at 0.8.0 2017-11-26 22:09:16 -05:00
Raymond Gauthier
33dc8ced65 vscode-extension-ms-vscode-cpptools: Init at 0.12.3 2017-09-03 11:18:51 -04:00
Raymond Gauthier
763f7f7578 vscode-with-extension: improvements
-  Now simply let the default `unpackPhase` unzip the vsix file. This
    should allow users to retrieve the extension directly from github.
 -  Extensions now installed using their unique id as install folder.
 -  Extensions under `vscode-extensions` now use the unique id
    as extension name.
2017-08-23 21:31:57 -04:00
Raymond Gauthier
2a9cb9d36d vscode-with-extensions: init at 1.10.2 2017-08-18 11:24:53 -04:00