mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
Merge pull request #2455 from cgwalters/packit
Attempt to update packit flow to build in COPR
This commit is contained in:
commit
ec8cf31e98
18
.packit.yaml
18
.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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user