diff options
-rw-r--r-- | .packit.yaml | 18 | ||||
-rwxr-xr-x | ci/make-git-snapshot.sh | 26 |
2 files changed, 23 insertions, 21 deletions
diff --git a/.packit.yaml b/.packit.yaml index 857d6ec4..68a1c724 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,14 +1,24 @@ # build into f34-coreos-continuous on every commit to main jobs: - - job: production_build + - job: copr_build trigger: commit metadata: - branch: main - targets: f34-coreos-continuous + branch: main + owner: "@CoreOS" + project: continuous + targets: + - centos-stream-8-aarch64 + - centos-stream-8-x86_64 + - fedora-all-aarch64 + - fedora-all-s390x + - fedora-all specfile_path: ostree.spec actions: + create-archive: + - "./ci/make-git-snapshot.sh" + - "bash -c 'ls ostree-*.tar'" # https://packit.dev/faq/#how-can-i-download-rpm-spec-file-if-it-is-not-part-of-upstream-repository post-upstream-clone: - - "wget https://src.fedoraproject.org/rpms/ostree/raw/rawhide/f/ostree.spec" + - "curl -LO https://src.fedoraproject.org/rpms/ostree/raw/rawhide/f/ostree.spec" # we don't want any downstream patches - "sed -ie 's/^Patch/# Patch/g' ostree.spec" diff --git a/ci/make-git-snapshot.sh b/ci/make-git-snapshot.sh index 1a137bff..67cf14c9 100755 --- a/ci/make-git-snapshot.sh +++ b/ci/make-git-snapshot.sh @@ -1,31 +1,23 @@ -#!/bin/sh +#!/bin/bash +set -xeuo pipefail -srcdir=$1 -shift -PKG_VER=$1 -shift -GITREV=$1 -shift +TOP=$(git rev-parse --show-toplevel) +GITREV=$(git rev-parse HEAD) +gitdescribe=$(git describe --always --tags $GITREV) +version=$(echo "$gitdescribe" | sed -e 's,-,\.,g' -e 's,^v,,') +name=$(basename $(pwd)) +PKG_VER="${name}-${version}" TARFILE=${PKG_VER}.tar TARFILE_TMP=${TARFILE}.tmp -set -x -set -e - -test -n "${srcdir}" -test -n "${PKG_VER}" -test -n "${GITREV}" - -TOP=$(git rev-parse --show-toplevel) - echo "Archiving ${PKG_VER} at ${GITREV} to ${TARFILE_TMP}" (cd ${TOP}; git archive --format=tar --prefix=${PKG_VER}/ ${GITREV}) > ${TARFILE_TMP} ls -al ${TARFILE_TMP} (cd ${TOP}; git submodule status) | while read line; do rev=$(echo ${line} | cut -f 1 -d ' '); path=$(echo ${line} | cut -f 2 -d ' ') echo "Archiving ${path} at ${rev}" - (cd ${srcdir}/${path}; git archive --format=tar --prefix=${PKG_VER}/${path}/ ${rev}) > submodule.tar + (cd ${TOP}/${path}; git archive --format=tar --prefix=${PKG_VER}/${path}/ ${rev}) > submodule.tar tar -A -f ${TARFILE_TMP} submodule.tar rm submodule.tar done |