Compare commits

...

7 Commits

Author SHA1 Message Date
KeksNino dd6d16d833 fix workflows (again) 2025-10-20 17:24:04 +02:00
KeksNino 7d0c8d16ec fix workflows (again) 2025-10-20 17:21:47 +02:00
KeksNino 80750f010f fix workflows (again) 2025-10-20 17:00:14 +02:00
KeksNino c93f6345c8 fix workflows (again) 2025-10-20 16:36:10 +02:00
KeksNino a7132ed1cd fix workflows (again) 2025-10-19 19:45:19 +02:00
KeksNino a2cff15d0d fix workflows (hopefully) 2025-10-19 19:39:33 +02:00
KeksNino 2eb384f7cf fix build_info.json 2025-10-19 17:51:21 +02:00
2 changed files with 36 additions and 35 deletions
+34 -31
View File
@@ -35,6 +35,8 @@ jobs:
asset_name: SoftwareManager-dev-macos
runs-on: ${{ matrix.os }}
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout code
@@ -66,13 +68,35 @@ jobs:
pip install -r requirements.txt
pip install pyinstaller
- name: Inject commit hash into code
- name: Generate version
id: version
shell: bash
run: |
echo "version = '${GITHUB_SHA}'" > build_info.json
COMMIT_SHA=${{ github.sha }}
SHORT_SHA=${COMMIT_SHA:0:7}
VERSION="${SHORT_SHA}-dev"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
echo "Generated version: $VERSION"
- name: Build executable with PyInstaller
- name: Inject commit hash into code (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$json = '{
"version": "' + $env:VERSION + '"
}'
$json | Out-File -Encoding utf8 build_info.json
- name: Build executable with PyInstaller (Windows)
if: runner.os == 'Windows'
run: pyinstaller --onefile --windowed --add-data "build_info.json:." --name ${{ env.APP_NAME }} main.py
- name: Build executable with PyInstaller (Unix)
if: runner.os != 'Windows'
run: pyinstaller --onefile --windowed --name ${{ env.APP_NAME }} main.py
- name: Make executable (Unix)
if: runner.os != 'Windows'
run: chmod +x dist/${{ env.APP_NAME }}
@@ -98,46 +122,25 @@ jobs:
if: success()
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Display downloaded artifacts
run: |
echo "Downloaded artifacts:"
find artifacts -type f
ls -la artifacts/
- name: Generate version
id: version
run: |
COMMIT_SHA=${{ github.sha }}
SHORT_SHA=${COMMIT_SHA:0:7}
VERSION="${SHORT_SHA}-dev"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "Generated version: ${VERSION}"
- name: Prepare release files
run: |
mkdir -p release
cp artifacts/ubuntu-latest-build/SoftwareManager-dev-linux release/SoftwareManager-dev-linux
cp artifacts/windows-latest-build/SoftwareManager-dev-windows.exe release/SoftwareManager-dev-windows.exe
cp artifacts/macos-latest-build/SoftwareManager-dev-macos release/SoftwareManager-dev-macos
cp artifacts/ubuntu-latest-build/SoftwareManager-dev-linux release/
cp artifacts/windows-latest-build/SoftwareManager-dev-windows.exe release/
cp artifacts/macos-latest-build/SoftwareManager-dev-macos release/
chmod +x release/SoftwareManager-dev-linux release/SoftwareManager-dev-macos
ls -la release/
- name: Create Release (Public)
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.version }}
name: ${{ steps.version.outputs.version }}
draft: false
prerelease: false
tag_name: ${{ needs.build.outputs.version }}
name: ${{ needs.build.outputs.version }}
files: |
release/SoftwareManager-dev-linux
release/SoftwareManager-dev-windows.exe
+2 -4
View File
@@ -16,10 +16,9 @@ from PySide6.QtWidgets import (
QHeaderView,
QMessageBox,
QTableWidget,
QTableWidgetItem
)
from PySide6.QtGui import QIcon, QAction, QCloseEvent, QPalette
from PySide6.QtGui import QIcon, QAction, QCloseEvent
import darkdetect
import threading
import platform
@@ -29,7 +28,6 @@ import subprocess
import time
import sys
import json
from core.utils.config.settings import save_settings
from core.utils.general.wrappers import run_thread
from core.utils.data.state import state
from core.utils.network.download import download_selected
@@ -64,7 +62,7 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
if os.path.exists(build_info_path):
with open(build_info_path, "r") as f:
build_info = json.load(f)
state.version = build_info.get("version", "dev")
state.version = build_info.get("version")
# Check for updates on Windows
if state.ignore_updates is False: