From 3d033a48ea4f6fbb6f27b51c2f9318af3da8c2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 29 May 2024 02:46:29 +0200 Subject: [PATCH] =?UTF-8?q?[workflows:executables]=20change=20dev/linux=20?= =?UTF-8?q?binary=20name=20to=20=E2=80=A6=5Flinux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 05f8435e09d70f45fa5382a8bc4de1d8a0b24921. --- .github/workflows/executables.yml | 2 +- gallery_dl/update.py | 11 +++++++++-- scripts/pyinstaller.py | 7 +++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/executables.yml b/.github/workflows/executables.yml index f9bcd701..bbdf1291 100644 --- a/.github/workflows/executables.yml +++ b/.github/workflows/executables.yml @@ -71,7 +71,7 @@ jobs: - name: Build executable run: | pip install requests requests[socks] yt-dlp pyyaml ${{ matrix.python-packages }} pyinstaller - python ./scripts/pyinstaller.py --os '${{ matrix.os }}' --arch '${{ matrix.architecture }}' + python ./scripts/pyinstaller.py --label '${{ env.LABEL }}' - uses: actions/upload-artifact@v4 with: diff --git a/gallery_dl/update.py b/gallery_dl/update.py index f971bd21..b068e375 100644 --- a/gallery_dl/update.py +++ b/gallery_dl/update.py @@ -31,7 +31,7 @@ BINARIES_DEV = { "windows" : "gallery-dl_windows.exe", "windows_x86": "gallery-dl_windows_x86.exe", "windows_x64": "gallery-dl_windows.exe", - "linux" : "gallery-dl_ubuntu", + "linux" : "gallery-dl_linux", "macos" : "gallery-dl_macos", } BINARIES = { @@ -204,8 +204,15 @@ class UpdateExtractor(Extractor): data["_check"] = check data["_exact"] = exact + if binary == "linux" and \ + repo != "stable" and \ + data["tag_name"] <= "2024.05.28": + binary_name = "gallery-dl_ubuntu" + else: + binary_name = BINARIES[repo][binary] + url = "{}/{}/releases/download/{}/{}".format( - self.root, path_repo, data["tag_name"], BINARIES[repo][binary]) + self.root, path_repo, data["tag_name"], binary_name) yield Message.Directory, data yield Message.Url, url, data diff --git a/scripts/pyinstaller.py b/scripts/pyinstaller.py index 16d47ba9..58303547 100755 --- a/scripts/pyinstaller.py +++ b/scripts/pyinstaller.py @@ -22,12 +22,15 @@ def main(): else: label = "" if args.os: - label += args.os.partition("-")[0].lower() + os = args.os.partition("-")[0].lower() + if os == "ubuntu": + os = "linux" + label += os if args.arch == "x86": label += "_x86" if args.print: - return print(label.replace("ubuntu", "linux")) + return print(label) name = "gallery-dl" if label: