@@ -17,18 +17,21 @@ srpm_build_deps:
1717
1818actions :
1919 get-current-version :
20- # Derive version from the latest upstream tag on the current branch.
21- - ' bash -c "git describe --tags --match '' v*'' --abbrev=0 HEAD | sed '' s/^v//'' "'
20+ # Derive version from the latest SemVer upstream tag on the current branch.
21+ # Avoid operational tags such as vm-dev; Packit normalizes that to m.dev,
22+ # which is not a valid Cargo package version.
23+ - ' bash -c "git describe --tags --match '' v[0-9]*.[0-9]*.[0-9]*'' --abbrev=0 HEAD | sed '' s/^v//'' "'
2224
2325 create-archive :
2426 # Step 1: Create source tarball from git working tree.
2527 # Uses git ls-files + tar instead of git archive so the tarball
2628 # reflects any patching that Packit may have done (e.g. version bumps).
2729 - ' bash -c "VERSION=${PACKIT_PROJECT_VERSION} && TMPDIR=$(mktemp -d) && DIR=openshell-${VERSION} && mkdir -p ${TMPDIR}/${DIR} && git ls-files -z | xargs -0 tar cf - | tar xf - -C ${TMPDIR}/${DIR}/ && tar -czf openshell-${VERSION}.tar.gz -C ${TMPDIR} ${DIR} && rm -rf ${TMPDIR}"'
2830 # Step 2: Create vendored Cargo dependencies tarball for offline RPM build.
29- - ' bash -c "VERSION=${PACKIT_PROJECT_VERSION} && cargo vendor --quiet && tar -cJf openshell-${VERSION}-vendor.tar.xz vendor/ && rm -rf vendor/"'
30- # Step 3: Return BOTH archive names. Packit maps each line to Source0, Source1, etc.
31- - ' bash -c "echo openshell-${PACKIT_PROJECT_VERSION}.tar.gz && echo openshell-${PACKIT_PROJECT_VERSION}-vendor.tar.xz"'
31+ - ' bash -c "VERSION=${PACKIT_PROJECT_VERSION} && CARGO_HTTP_TIMEOUT=600 CARGO_NET_RETRY=5 cargo vendor --locked --quiet && tar -cJf openshell-${VERSION}-vendor.tar.xz vendor/ && rm -rf vendor/"'
32+ # Step 3: Return the primary archive name. Packit expects create-archive
33+ # to print one path for Source0; Source1 is patched explicitly below.
34+ - ' bash -c "echo openshell-${PACKIT_PROJECT_VERSION}.tar.gz"'
3235
3336 fix-spec-file :
3437 # Update Source0 to the generated tarball name
0 commit comments