diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 7a7f300..f471661 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -376,6 +376,16 @@ jobs: id: buildx uses: docker/setup-buildx-action@v3 + - name: Read version from VERSION file + id: get_version + run: echo "APP_VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT + + - name: Set build metadata + id: build_meta + run: | + echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT + echo "VCS_REF=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + - name: Build and push id: docker_build uses: docker/build-push-action@v6 @@ -383,7 +393,10 @@ jobs: context: ./ file: ./Dockerfile build-args: | - "BRANCH_NAME=develop" + BRANCH_NAME=develop + APP_VERSION=${{ steps.get_version.outputs.APP_VERSION }} + BUILD_DATE=${{ steps.build_meta.outputs.BUILD_DATE }} + VCS_REF=${{ steps.build_meta.outputs.VCS_REF }} platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: | diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 392b868..e61d926 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -400,12 +400,26 @@ jobs: id: get_version run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + - name: Read version from VERSION file + id: get_app_version + run: echo "APP_VERSION=$(cat VERSION)" >> $GITHUB_OUTPUT + + - name: Set build metadata + id: build_meta + run: | + echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT + echo "VCS_REF=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + - name: Build and push id: docker_build uses: docker/build-push-action@v6 with: context: ./ file: ./Dockerfile + build-args: | + APP_VERSION=${{ steps.get_app_version.outputs.APP_VERSION }} + BUILD_DATE=${{ steps.build_meta.outputs.BUILD_DATE }} + VCS_REF=${{ steps.build_meta.outputs.VCS_REF }} platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f4ac3a..3ea366e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,6 +5,7 @@ repos: hooks: - id: trailing-whitespace - id: end-of-file-fixer + exclude: ^desktop/tauri/src-tauri/tauri\.conf\.json$ - id: check-merge-conflict - id: check-json - id: check-yaml @@ -13,6 +14,7 @@ repos: - id: fix-byte-order-marker - id: pretty-format-json args: [--autofix, --indent, '4', --no-sort-keys] + exclude: ^desktop/tauri/src-tauri/tauri\.conf\.json$ - repo: https://github.com/adrienverge/yamllint.git rev: v1.37.1 # or higher tag hooks: @@ -41,3 +43,11 @@ repos: language: script pass_filenames: false stages: [pre-commit] + - id: cargo-check + name: Cargo check for Tauri desktop app + entry: bash -c "cd desktop/tauri/src-tauri && cargo check" + language: system + pass_filenames: false + files: ^desktop/tauri/src-tauri/.*\.(rs|toml|lock|json)$ + stages: [pre-commit] + types_or: [rust, toml, json] diff --git a/Dockerfile b/Dockerfile index 6bbb172..682e3fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,25 @@ RUN /root/.local/bin/uv pip install --system . # Final stage: minimal runtime image FROM python:3.13-alpine +# Build arguments +ARG APP_VERSION +ARG BUILD_DATE +ARG VCS_REF + +# OCI Image Specification labels +LABEL org.opencontainers.image.title="qbit-manage" +LABEL org.opencontainers.image.description="This tool will help manage tedious tasks in qBittorrent and automate them. Tag, categorize, remove Orphaned data, remove unregistered torrents and much much more." +LABEL org.opencontainers.image.version="$APP_VERSION" +LABEL org.opencontainers.image.created="$BUILD_DATE" +LABEL org.opencontainers.image.revision="$VCS_REF" +LABEL org.opencontainers.image.authors="bobokun" +LABEL org.opencontainers.image.vendor="StuffAnThings" +LABEL org.opencontainers.image.licenses="MIT" +LABEL org.opencontainers.image.url="https://github.com/StuffAnThings/qbit_manage" +LABEL org.opencontainers.image.documentation="https://github.com/StuffAnThings/qbit_manage/wiki" +LABEL org.opencontainers.image.source="https://github.com/StuffAnThings/qbit_manage" +LABEL org.opencontainers.image.base.name="python:3.13-alpine" + ENV TINI_VERSION=v0.19.0 # Runtime dependencies (smaller than build stage) diff --git a/VERSION b/VERSION index bf1f44d..4cd351a 100755 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.5.5-develop7 +4.5.5-develop8 diff --git a/desktop/tauri/src-tauri/Cargo.lock b/desktop/tauri/src-tauri/Cargo.lock index ba8f344..6cfb45f 100644 --- a/desktop/tauri/src-tauri/Cargo.lock +++ b/desktop/tauri/src-tauri/Cargo.lock @@ -2917,7 +2917,7 @@ dependencies = [ [[package]] name = "qbit-manage-desktop" -version = "4.5.4-develop51" +version = "4.5.5-develop8" dependencies = [ "libc", "once_cell", diff --git a/desktop/tauri/src-tauri/Cargo.toml b/desktop/tauri/src-tauri/Cargo.toml index b031bfc..ffb70d2 100644 --- a/desktop/tauri/src-tauri/Cargo.toml +++ b/desktop/tauri/src-tauri/Cargo.toml @@ -43,7 +43,7 @@ license = "MIT" name = "qbit-manage-desktop" repository = "" rust-version = "1.70" -version = "4.5.4-develop52" +version = "4.5.5-develop8" [target."cfg(unix)".dependencies] libc = "0.2" diff --git a/desktop/tauri/src-tauri/tauri.conf.json b/desktop/tauri/src-tauri/tauri.conf.json index d018cc2..d873711 100644 --- a/desktop/tauri/src-tauri/tauri.conf.json +++ b/desktop/tauri/src-tauri/tauri.conf.json @@ -1,72 +1,72 @@ { - "app": { - "security": { - "csp": null - }, - "windows": [ - { - "decorations": true, - "fullscreen": false, - "height": 800, - "label": "main", - "minHeight": 600, - "minWidth": 900, - "resizable": true, - "title": "qBit Manage", - "visible": false, - "width": 1100 - } - ], - "withGlobalTauri": true + "app": { + "security": { + "csp": null }, - "build": { - "beforeBuildCommand": "", - "beforeDevCommand": "", - "devUrl": "http://localhost:8080", - "frontendDist": "../src" + "windows": [ + { + "decorations": true, + "fullscreen": false, + "height": 800, + "label": "main", + "minHeight": 600, + "minWidth": 900, + "resizable": true, + "title": "qBit Manage", + "visible": false, + "width": 1100 + } + ], + "withGlobalTauri": true + }, + "build": { + "beforeBuildCommand": "", + "beforeDevCommand": "", + "devUrl": "http://localhost:8080", + "frontendDist": "../src" + }, + "bundle": { + "active": true, + "category": "Utility", + "icon": [ + "../../../icons/qbm_logo.icns", + "../../../icons/qbm_logo.ico", + "../../../icons/qbm_logo.png" + ], + "linux": { + "deb": { + "depends": [ + "libgtk-3-0", + "libayatana-appindicator3-1", + "libwebkit2gtk-4.1-0" + ] + } }, - "bundle": { - "active": true, - "category": "Utility", - "icon": [ - "../../../icons/qbm_logo.icns", - "../../../icons/qbm_logo.ico", - "../../../icons/qbm_logo.png" - ], - "linux": { - "deb": { - "depends": [ - "libgtk-3-0", - "libayatana-appindicator3-1", - "libwebkit2gtk-4.1-0" - ] - } - }, - "macOS": { - "frameworks": [], - "minimumSystemVersion": "10.13" - }, - "resources": [ - "bin/*" - ], - "targets": [ - "deb", - "nsis", - "app", - "dmg" - ], - "windows": { - "certificateThumbprint": null, - "digestAlgorithm": "sha256", - "nsis": { - "displayLanguageSelector": true, - "installMode": "currentUser", - "installerIcon": "../../../icons/qbm_logo.ico" - }, - "timestampUrl": "" - } + "macOS": { + "frameworks": [], + "minimumSystemVersion": "10.13" }, - "identifier": "com.qbitmanage.desktop", - "productName": "qBit Manage", - "version": "4.5.4-develop52" -} + "resources": [ + "bin/*" + ], + "targets": [ + "deb", + "nsis", + "app", + "dmg" + ], + "windows": { + "certificateThumbprint": null, + "digestAlgorithm": "sha256", + "nsis": { + "displayLanguageSelector": true, + "installMode": "currentUser", + "installerIcon": "../../../icons/qbm_logo.ico" + }, + "timestampUrl": "" + } + }, + "identifier": "com.qbitmanage.desktop", + "productName": "qBit Manage", + "version": "4.5.5-develop8" +} \ No newline at end of file