Packit: move scripts to contrib/packit-tmt

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
Lokesh Mandvekar
2025-11-12 14:30:47 -05:00
parent 07e4b253c6
commit fffb1b3ba8
3 changed files with 8 additions and 5 deletions

View File

@@ -44,8 +44,8 @@ srpm_build_deps:
- make - make
actions: actions:
fix-spec-file: "bash .packit-copr-rpm.sh" fix-spec-file: "bash contrib/packit-tmt/packit-copr-rpm.sh"
pre-sync: "bash .packit-rpm-git-commit.sh" pre-sync: "bash contrib/packit-tmt/packit-rpm-git-commit.sh"
jobs: jobs:
- job: copr_build - job: copr_build

View File

@@ -6,16 +6,19 @@
set -exo pipefail set -exo pipefail
. .packit-rpm-git-commit.sh TOP_GIT_DIR=$(git rev-parse --show-toplevel)
. "$TOP_GIT_DIR"/contrib/packit-tmt/packit-rpm-git-commit.sh
# Get Version from HEAD # Get Version from HEAD
VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2) VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2)
# RPM Version can't take "-" # RPM Version can't take "-"
RPM_VERSION=$(echo $VERSION | sed -e 's/-/~/') # shellcheck disable=SC2001
RPM_VERSION=$(echo "$VERSION" | sed -e 's/-/~/')
# Generate source tarball from HEAD # Generate source tarball from HEAD
git-archive-all -C $(git rev-parse --show-toplevel) --prefix=$PACKAGE-$VERSION/ rpm/$PACKAGE-$VERSION.tar.gz git-archive-all -C "$TOP_GIT_DIR" --prefix="$PACKAGE-$VERSION/" "$TOP_GIT_DIR/rpm/$PACKAGE-$VERSION.tar.gz"
# RPM Spec modifications # RPM Spec modifications