From 4ae5ee4fbbbf838348ade77d73af887962c3959a Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 4 Dec 2025 13:53:39 +0900 Subject: [PATCH] .gitea/workflows: fix deb building args --- .gitea/workflows/publish-deb.yml | 7 +++---- create-deb.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/publish-deb.yml b/.gitea/workflows/publish-deb.yml index 92807cf..ce630f7 100644 --- a/.gitea/workflows/publish-deb.yml +++ b/.gitea/workflows/publish-deb.yml @@ -49,10 +49,9 @@ jobs: run: cargo install cargo-deb - name: Build deb package - run: | - ./create-deb.sh \ - ${{ inputs.deb_version != "" && "--deb-version " + inputs.deb_version || "" }} \ - ${{ inputs.deb_revision != "" && "--deb-revision " + inputs.deb_revision || "" }} + env: + CREATE_DEB_DEBUG: "1" + run: ./create-deb.sh ${{ inputs.deb_version != "" && "--deb-version " + inputs.deb_version || "" }} --deb-revision ${{ inputs.deb_revision }} - name: Upload deb package artifact uses: actions/upload-artifact@v3 diff --git a/create-deb.sh b/create-deb.sh index 310c5fd..9b5ca2f 100755 --- a/create-deb.sh +++ b/create-deb.sh @@ -2,6 +2,20 @@ set -euo pipefail +if [[ "${CREATE_DEB_DEBUG:-}" == "1" ]]; then + set -x +fi + +if ! command -v cargo &> /dev/null; then + echo "cargo could not be found" >&2 + exit 1 +fi + +if ! command -v cargo-deb &> /dev/null; then + echo "cargo-deb could not be found" >&2 + exit 1 +fi + cargo build --release mkdir -p assets/completions