Commit graph

29 commits

Author SHA1 Message Date
figsoda 90c4482d07 pluginupdate.py: format with black, fix comments 2023-08-12 11:41:04 -04:00
figsoda 32f6cfaae5 pluginupdate: don't rely on NIX_PATH
Nix does not respect `NIX_PATH` when the `nix-path` setting in nix.conf is set
2023-08-12 11:32:02 -04:00
Matthieu Coudron 351cec5db3
use subcommands in plugin updaters (#223164)
* update.py: introduce subparsers for plugin updaters

This is preliminary work to help create more powerful plugin updaters.
Namely I would like to be able to "just add" plugins without refreshing
the older ones (helpful when github temporarily removes a user from
github due to automated bot detection).

Also concerning the lua updater, we pin some of the dependencies, and I
would like to be able to unpin the package without editing the csv
(coming in later PRs).

* doc/updaters: update command to update editor plugins

including vim, kakoune and lua packages

Co-authored-by: figsoda
2023-04-14 22:02:17 +02:00
figsoda d8426de146 scripts/pluginupdate: fix fetchgit indentation 2022-11-17 20:51:34 -05:00
figsoda c95706ac44 vimPlugins: also update nvim-treesitter grammars in the update script 2022-11-04 15:52:00 -04:00
Matthieu Coudron d4894355c1 vim/update.py: distinguish between vim/neovim plugins
I've been working for a long time towards automatic nix dependencies for
neovim plugins (using luarocks rockspecs to discover the said
dependencies).
This is an initial commit to help me complete the missing bits.
buildNeovimPluginFrom2Nix is right now a placeholder which helps me test
in my fork a version that does a flat install of luarocks.

the vim updater will now check for attributes with the same name in the lua package set,
if that's the case the script will generate buildNeovimPluginFrom2Nix.
2022-05-03 00:22:03 +02:00
Matthieu Coudron 1b8e123255 vim/update.py: fix handling of redirects 2022-05-01 21:54:55 +02:00
Matthieu Coudron ec6cf1aa51 update.py: updater vim updater
We want to support plugins on other hosts than github.
A more structured format will allow more features too.
2022-04-03 18:14:14 +02:00
Bruno BELANYI 75e1bb15fa vim/update.py: make '--add' option work 2022-02-25 11:54:07 +01:00
AndersonTorres 3f19fc37a3 Move misc/vim-plugins to applications/editors/vim/plugins 2022-02-24 20:26:07 -03:00
Matthieu Coudron db693baf19 vim/update.py: accept github token as argument
I find it more practical (can run update.py --github-token=$(pass gihtub-token)" rather than putting token in ENV). Also makes it more discoverable. I introduced a FetchConfig variable to pass editor agnostic configuration.
2022-02-17 12:19:45 +01:00
Matthieu Coudron 9d9b5b321e vim/update.py: add dummy nixpkgs_repo to shutdown pyright warnings 2022-02-17 11:51:16 +01:00
Lily Foster b6718ec0aa pluginupdate.py: fix regression with plugin line splitting
Before 46c68ad both "@" and " as " could be used in the same line like
the following:

    vimwiki/vimwiki@dev as vimwiki-dev

After 46c68ad this gives an error due to the split URI still erroneously
including the " as [name]" at the end, due to splitting from the wrong
variable.
2022-01-21 14:18:21 +01:00
Matthieu Coudron 4f0cb8a071 update.py: mention GITHUB_API_TOKEN in the help 2022-01-20 22:45:42 +01:00
Matthieu Coudron 46c68ad418 update.py: support remotes other than github
right now we can only refer to repositories hosted on github.
This allows to give random git repo uris like for instance:
https://git.sr.ht/~whynothugo/lsp_lines.nvim
2022-01-20 22:45:42 +01:00
Dr Perceptron 539f55df44
pluginupdate.py: make experimental feature nix-command explicit 2022-01-08 18:58:15 +11:00
Matthieu Coudron 7a30a844c6 pluginupdate.py: support comments
when maintaining out of tree plugins, it makes it easier to swap/comment on specific plugins
2021-12-22 00:33:12 +01:00
oxalica aad1bda6f3
scripts/pluginupdate.py: use HEAD as default branch
Thus we always use the default branch. No need to special handle of `master`,
`main`, `trunk` and etc.
2021-12-07 18:50:38 +08:00
figsoda 5aaa5f5e75 pluginupdate.py: fix compatibility with nix 2.4 2021-11-13 17:33:43 +01:00
José Luis Lafuente b891957a97 Allow to execute update script in CI environment
If the script is executed in a CI (like in github actions, with the
install-nix-action) it fails. This changes fixes that use case. In that
scenario, you should provide the --no-commit flag.
2021-09-03 12:35:12 +02:00
Matthieu Coudron 7344a0e763 update.py: fix vim's updater script
recent updates to luarocks updater had broken the vim plugin update script
2021-08-14 00:08:19 +02:00
Matthieu Coudron 8ddad244ea update-luarocks-packages: use pluginupdate.py
Cleans up the common interface between the updaters.
Restores the ability to regen the lua packages in parallel.
2021-08-12 01:14:58 +02:00
Matthieu Coudron b02c265190 luaPackages: update
Several updates
2021-08-09 21:38:32 +02:00
Matthieu Coudron 560a4e4e08 update-luarocks-packages: use pluginupdate.py
Trying to reuse the update scripts used by kakoune/vim to provide the
user with an unified convergence. Some stuff doesn't work yet (parallel
download, caching) but I (anyone else welcome to try too) will improve
it in other PRs.
2021-08-09 21:37:56 +02:00
Matthieu Coudron 0a9e9c0965 pkgs/misc/vim-plugins/update.py: add logging
there was a 404 error, having basic logging makes it easier to troubleshoot
2021-05-17 00:40:25 +02:00
Matthieu Coudron 3eb8f4d15c
update.py: allow to disable autocommit (#119182) 2021-04-22 03:21:36 +02:00
Flakebi 04184cd64f
scripts.pluginupdate: write final newline
json.dump does not write any newline, so the final newline in the file
is missing.
2021-03-22 22:56:47 +01:00
Andrey Kuznetsov 164fc8c49a
vimPlugins: fix pluginupdate.py 2021-03-16 17:24:18 +00:00
Flakebi 2123e325c9
vimPlugins: make update.py generic over editor
Move the script to maintainers/scripts/pluginupdate.py.
Importing it from the vim and kakoune update scripts
is done in the commit afterwards to cleanup the diff.
2021-02-25 10:05:22 +01:00
Renamed from pkgs/misc/vim-plugins/update.py (Browse further)