From 13c2dbc0750eaab16f40e817c129f8dbd16dc0a3 Mon Sep 17 00:00:00 2001 From: robojerk Date: Sun, 3 Aug 2025 23:54:32 +0000 Subject: [PATCH] fix CI/CD workflows: direct git clone and version extraction from setup.py --- .forgejo/workflows/build-deb.yml | 5 ++++- .forgejo/workflows/test.yml | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/build-deb.yml b/.forgejo/workflows/build-deb.yml index 0ae14f7..b0fb03f 100644 --- a/.forgejo/workflows/build-deb.yml +++ b/.forgejo/workflows/build-deb.yml @@ -58,8 +58,11 @@ jobs: - name: Build Debian package run: | + # Get version from setup.py instead of importing module + VERSION=$(python3 -c "import re; print(re.search(r'version=[\"\']([^\"\']+)[\"\']', open('setup.py').read()).group(1))") + echo "Building version: $VERSION" + # Update changelog with current version - VERSION=$(python3 -c "import deb_mock; print(deb_mock.__version__)") dch --newversion "$VERSION-1" --distribution unstable "Build from CI/CD" # Build the package diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index f6346da..6731269 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -13,11 +13,8 @@ jobs: steps: - name: Checkout code run: | - git clone https://git.raines.xyz/robojerk/deb-mock.git /tmp/deb-mock - # Copy all files including hidden ones - cp -r /tmp/deb-mock/* . - cp -r /tmp/deb-mock/.gitignore . 2>/dev/null || true - cp -r /tmp/deb-mock/.forgejo . 2>/dev/null || true + # Clone directly to current directory + git clone https://git.raines.xyz/robojerk/deb-mock.git . # Verify all files are copied echo "Checking repository contents:" ls -la