From fffb1b3ba80693858229078e7dc533f13d98a043 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 12 Nov 2025 14:30:47 -0500 Subject: [PATCH] Packit: move scripts to contrib/packit-tmt Signed-off-by: Lokesh Mandvekar --- .packit.yaml | 4 ++-- .../packit-tmt/packit-copr-rpm.sh | 9 ++++++--- .../packit-tmt/packit-rpm-git-commit.sh | 0 3 files changed, 8 insertions(+), 5 deletions(-) rename .packit-copr-rpm.sh => contrib/packit-tmt/packit-copr-rpm.sh (78%) rename .packit-rpm-git-commit.sh => contrib/packit-tmt/packit-rpm-git-commit.sh (100%) diff --git a/.packit.yaml b/.packit.yaml index 3e7827fbf3..37be3fda7e 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -44,8 +44,8 @@ srpm_build_deps: - make actions: - fix-spec-file: "bash .packit-copr-rpm.sh" - pre-sync: "bash .packit-rpm-git-commit.sh" + fix-spec-file: "bash contrib/packit-tmt/packit-copr-rpm.sh" + pre-sync: "bash contrib/packit-tmt/packit-rpm-git-commit.sh" jobs: - job: copr_build diff --git a/.packit-copr-rpm.sh b/contrib/packit-tmt/packit-copr-rpm.sh similarity index 78% rename from .packit-copr-rpm.sh rename to contrib/packit-tmt/packit-copr-rpm.sh index 9200eaf6e5..ace24b916a 100644 --- a/.packit-copr-rpm.sh +++ b/contrib/packit-tmt/packit-copr-rpm.sh @@ -6,16 +6,19 @@ 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 VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2) # 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 -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 diff --git a/.packit-rpm-git-commit.sh b/contrib/packit-tmt/packit-rpm-git-commit.sh similarity index 100% rename from .packit-rpm-git-commit.sh rename to contrib/packit-tmt/packit-rpm-git-commit.sh