Skip to content

Commit 571dbb9

Browse files
committed
Packit: move scripts to contrib/packit-tmt
Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent d8c2cb8 commit 571dbb9

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.packit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ srpm_build_deps:
4444
- make
4545

4646
actions:
47-
fix-spec-file: "bash .packit-copr-rpm.sh"
48-
pre-sync: "bash .packit-rpm-git-commit.sh"
47+
fix-spec-file: "bash contrib/packit-tmt/packit-copr-rpm.sh"
48+
pre-sync: "bash contrib/packit-tmt/packit-rpm-git-commit.sh"
4949

5050
jobs:
5151
- job: copr_build

.packit-copr-rpm.sh renamed to contrib/packit-tmt/packit-copr-rpm.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@
66

77
set -exo pipefail
88

9-
. .packit-rpm-git-commit.sh
9+
TOP_GIT_DIR=$(git rev-parse --show-toplevel)
10+
11+
. "$TOP_GIT_DIR"/contrib/packit-tmt/packit-rpm-git-commit.sh
1012

1113
# Get Version from HEAD
1214
VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2)
1315

1416
# RPM Version can't take "-"
15-
RPM_VERSION=$(echo $VERSION | sed -e 's/-/~/')
17+
# shellcheck disable=SC2001
18+
RPM_VERSION=$(echo "$VERSION" | sed -e 's/-/~/')
1619

1720
# Generate source tarball from HEAD
18-
git-archive-all -C $(git rev-parse --show-toplevel) --prefix=$PACKAGE-$VERSION/ rpm/$PACKAGE-$VERSION.tar.gz
21+
git-archive-all -C "$TOP_GIT_DIR" --prefix="$PACKAGE-$VERSION/" "$TOP_GIT_DIR/rpm/$PACKAGE-$VERSION.tar.gz"
1922

2023
# RPM Spec modifications
2124

File renamed without changes.

0 commit comments

Comments
 (0)