vapoursynth / vsrepo

A simple package repository for VapourSynth
MIT License
113 stars 29 forks source link

vsrupdate: Allow updates from single repo for all plugins #239

Closed Stefan-Olt closed 1 month ago

Stefan-Olt commented 1 month ago

This adds a -multi-url to allow updating all plugins from a single GitHub repository. The plugin is identified by the release tags, which need to be in this format: vsplugin/{identifier}/{version}/{platform}/* and should contain only a single asset.

Usage (this is what I did):

python3 vsrupdate.py update-local -g [GITHUB_TOKEN] -multi-url https://github.com/Stefan-Olt/vs-plugin-build

Builds from the standard plugin repository have higher priority, a release from the multi-plugin repository is only added, if there is no build for that platform and version in the plugin repository.

I also added Linux (and macOS) support to vsrupdate, this is just a few lines to not try getting 7z.exe path from the registry, but just use 7z on non-Windows platforms.

Tested update-local (for all plugins) and compile of vspackages3.json, worked perfectly, could copy that file and use vsrepo to install plugins just fine.

Additionally:

theChaosCoder commented 1 month ago

Found a small issue [WinError 267] invalid folder name : 'dlcache\motionmask_git:ed86b06'

the version string passed to fetch_url_to_cache() https://github.com/vapoursynth/vsrepo/pull/239/commits/7a4482c1cfab911698101d4d5cbb9941abb80750#diff-0d1b80c2d4ee47c026b11b9193c1192f607b2c0fe875cbf8bb045d02e2d1afb0R419 can create a invalid path in windows, not sure if : is valid on linux.

test with: python vsrupdate.py update-local -o -g <token> -multi-url https://github.com/Stefan-Olt/vs-plugin-build -p motionmask

theChaosCoder commented 1 month ago

Easiest fix temp_fn = fetch_url_to_cache(t_data['url'], name, version.replace(':','-'), pfile['name'] + ' ' + version + ' ' + target)