File: copr-build-setup

package info (click to toggle)
argparse-manpage 4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 568 kB
  • sloc: python: 2,772; makefile: 47; sh: 18
file content (32 lines) | stat: -rwxr-xr-x 876 bytes parent folder | download
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
30
31
32
#! /bin/bash

# Helper script (used by praiskup atm) to update CI scripting on Copr side.

script=$(readlink -f "$(dirname "$0")")/copr-custom-script
script_resultdir=argparse-manpage/rpm
pkgname=argparse-manpage

PROJECT_PUSH=praiskup/argparse-manpage-ci
PROJECT_PR=praiskup/argparse-manpage-pull-requests

build_deps=(
    git
    make
    python3-build
    python3-setuptools
    python-unversioned-command
)

for PROJECT in $PROJECT_PR $PROJECT_PUSH; do
    copr_cmd=(
        copr edit-package-custom "$PROJECT" \
            --webhook-rebuild on \
            --script "$script" \
            --script-chroot "fedora-latest-x86_64" \
            --script-builddeps "${build_deps[*]}" \
            --name "$pkgname" \
            --script-resultdir "$script_resultdir"
    )
    test "$PROJECT" = "$PROJECT_PR" && copr_cmd+=( --max-builds 20 )
    "${copr_cmd[@]}"
done