From de2e49e60bb225f593b9d2ed8218f2da738ba9b0 Mon Sep 17 00:00:00 2001 From: KeksNino Date: Mon, 20 Oct 2025 17:40:39 +0200 Subject: [PATCH] add back commit sha to release file name --- .github/workflows/dev.yml | 19 ++++++++++--------- core/interface/gui.py | 17 +++++++++-------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index e6eaf64..1237063 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -25,14 +25,14 @@ jobs: matrix: include: - os: ubuntu-latest - artifact_name: SoftwareManager-dev-linux - asset_name: SoftwareManager-dev-linux + artifact_name: SoftwareManager-dev-${{ github.sha }}-linux + asset_name: SoftwareManager-dev-${{ github.sha }}-linux - os: windows-latest - artifact_name: SoftwareManager-dev-windows.exe - asset_name: SoftwareManager-dev-windows.exe + artifact_name: SoftwareManager-dev-${{ github.sha }}-windows.exe + asset_name: SoftwareManager-dev-${{ github.sha }}-windows.exe - os: macos-latest - artifact_name: SoftwareManager-dev-macos - asset_name: SoftwareManager-dev-macos + artifact_name: SoftwareManager-dev-${{ github.sha }}-macos + asset_name: SoftwareManager-dev-${{ github.sha }}-macos runs-on: ${{ matrix.os }} outputs: @@ -141,9 +141,10 @@ jobs: with: tag_name: ${{ needs.build.outputs.version }} name: ${{ needs.build.outputs.version }} + prerelease: true files: | - release/SoftwareManager-dev-linux - release/SoftwareManager-dev-windows.exe - release/SoftwareManager-dev-macos + release/SoftwareManager-dev-${{ steps.version.outputs.short_sha }}-linux + release/SoftwareManager-dev-${{ steps.version.outputs.short_sha }}-windows.exe + release/SoftwareManager-dev-${{ steps.version.outputs.short_sha }}-macos env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/core/interface/gui.py b/core/interface/gui.py index 70ae479..4f5c87e 100644 --- a/core/interface/gui.py +++ b/core/interface/gui.py @@ -38,19 +38,20 @@ from core.interface.utils.searchhelper import return_pressed from core.interface.dialogs.settings import settings_dialog from core.network.aria2_integration import dlprogress -def download_update(): - filename = "SoftwareManager-dev-windows.exe" - url = "https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-windows.exe" +def download_update(latest_version): + old_filename = f"SoftwareManager-dev-{state.version}-windows.exe" + new_filename = f"SoftwareManager-dev-{latest_version}-windows.exe" + url = f"https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-{latest_version}-windows.exe" print("Downloading update...") - if os.path.exists(filename): - os.remove(filename) + if os.path.exists(old_filename): + os.remove(old_filename) response = r.get(url, allow_redirects=True) - with open(filename, "wb") as f: + with open(new_filename, "wb") as f: f.write(response.content) - if not os.path.exists(filename): + if not os.path.exists(new_filename): raise FileNotFoundError(f"Executable not found") - subprocess.Popen([filename], shell=True) + subprocess.Popen([new_filename], shell=True) time.sleep(0.5) sys.exit(0)