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: