1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#! /bin/bash -x
set -e
clone_url_parent=https://github.com/praiskup/argparse-manpage
workdir=$(basename "$clone_url_parent")
workdir=${workdir%%.git}
hook_payload=$(readlink -f "${HOOK_PAYLOAD-hook_payload}")
# clone the helper scripts when needed, and add to PATH
test -d copr-ci-tooling \
|| git clone --depth 1 https://github.com/praiskup/copr-ci-tooling.git
export PATH="$PWD/copr-ci-tooling:$PATH"
# clone the tested project
git clone \
--recursive \
--no-single-branch \
"$clone_url_parent"
# checkout requested revision
cd "$workdir"
webhook-checkout "$hook_payload"
cd rpm || exit 1
make srpm
|