From 303a05033116b77f42eb63bc405d7aa72dcb12d9 Mon Sep 17 00:00:00 2001 From: garret1317 Date: Thu, 13 Nov 2025 09:59:23 +0000 Subject: bundle script: include licence files in the bundle zip not _really_ needed right now since the only dep (protobug) is Unlicense but might be useful in future if i ever have to use some MIT-licenced one for example also it gives a nice way to signify the plugin version number _in_ the file (not just the .zip filename) --- contrib/bundle.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/bundle.sh b/contrib/bundle.sh index e51d6bc..cef3f79 100755 --- a/contrib/bundle.sh +++ b/contrib/bundle.sh @@ -2,7 +2,17 @@ version="$(uv tool run hatch version)" mkdir bundle/ uv pip install --python-version 3.9 --python-platform linux --requirements pyproject.toml --target bundle/yt_dlp_plugins/ -rm -rf bundle/yt_dlp_plugins/*.dist-info bundle/yt_dlp_plugins/bin uv pip install --python-version 3.9 --python-platform linux --no-deps --target bundle/ . + +for lib_distinfo in bundle/yt_dlp_plugins/*.dist-info bundle/*.dist-info; do + lib=$(basename "$lib_distinfo" .dist-info) + for licence_file in "$lib_distinfo"/licenses/*; do + licence_filename=$(basename "$licence_file") + cp "${licence_file}" "bundle/${lib}_${licence_filename}" + done +done + +rm -rf bundle/yt_dlp_plugins/*.dist-info bundle/*.dist-info bundle/yt_dlp_plugins/bin + mkdir -p dist/ -(cd bundle/ && zip -9 --recurse-paths ../dist/yt_dlp_rajiko-${version}.bundle.zip yt_dlp_plugins) +(cd bundle/ && zip -9 --recurse-paths ../dist/yt_dlp_rajiko-"${version}".bundle.zip .) -- cgit v1.2.3-70-g09d2