diff --git a/.forgejo/workflows/build-fedora.yml b/.forgejo/workflows/build-fedora.yml index 320ca146..1f601a9b 100644 --- a/.forgejo/workflows/build-fedora.yml +++ b/.forgejo/workflows/build-fedora.yml @@ -349,7 +349,8 @@ jobs: RPM=$(find artifacts -name "continuwuity-*.rpm" \ ! -name "*debuginfo*" \ ! -name "*debugsource*" \ - ! -name "*.src.rpm" | head -1) + ! -name "*.src.rpm" \ + -type f | head -1) if [ -z "$RPM" ]; then echo "No binary RPM found to publish" @@ -406,9 +407,8 @@ jobs: echo "" echo "Publishing source RPM: $(basename "$SRPM")" - # Extract SRPM info for deletion - SRPM_INFO=$(rpm -qpi "$SRPM" 2>/dev/null) - SRPM_ARCH=$(echo "$SRPM_INFO" | grep "^Architecture" | awk '{print $2}') + # SRPMs always have architecture "src" + SRPM_ARCH="src" # Try to delete existing SRPM first (using same name/version as binary RPM) echo "Removing any existing SRPM: $PACKAGE_NAME-$FULL_VERSION.$SRPM_ARCH"