From 61a64d4a05660e17b0ed05b175d7ad7f430a1f4a Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 22 Jan 2025 21:55:50 +0100 Subject: [PATCH] Refactor builder script and GitHub Actions workflow for yt-dlp. Updated builder script to use new module paths for dependency installation and packaging. Modified GitHub Actions to clone the yt-dlp repository instead of downloading a tarball, improving build efficiency and ensuring the latest code is used. --- .github/workflows/build-ytdlp.yaml | 7 ++----- builder.sh | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-ytdlp.yaml b/.github/workflows/build-ytdlp.yaml index 90c7c9a..4bc4d24 100644 --- a/.github/workflows/build-ytdlp.yaml +++ b/.github/workflows/build-ytdlp.yaml @@ -34,12 +34,9 @@ jobs: LATEST_VERSION=$(curl -s https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest | jq -r .tag_name) echo "version=${LATEST_VERSION}" >> $GITHUB_OUTPUT - - name: Download latest yt-dlp source + - name: Clone yt-dlp repository run: | - wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.tar.gz - mkdir yt-dlp - tar xzf yt-dlp.tar.gz -C yt-dlp --strip-components=1 - rm yt-dlp.tar.gz + git clone --depth 1 --branch release https://github.com/yt-dlp/yt-dlp.git - name: Log in to the Container registry uses: docker/login-action@v3 diff --git a/builder.sh b/builder.sh index 44ff656..7518855 100644 --- a/builder.sh +++ b/builder.sh @@ -7,10 +7,10 @@ set -e : "${VERSION:=$(date +%Y.%m.%d)}" source ~/.local/share/pipx/venvs/pyinstaller/bin/activate -python -m yt_dlp.devscripts.install_deps --include secretstorage --include curl-cffi -python -m yt_dlp.devscripts.make_lazy_extractors +python -m devscripts.install_deps --include secretstorage --include curl-cffi +python -m devscripts.make_lazy_extractors python devscripts/update-version.py -c "${CHANNEL}" -r "${ORIGIN}" "${VERSION}" -python -m yt_dlp.bundle.pyinstaller --onedir +python -m bundle.pyinstaller --onedir deactivate source ~/.local/share/pipx/venvs/staticx/bin/activate