Skip to content
Snippets Groups Projects
Verified Commit 85c1d571 authored by Tomas Krizek's avatar Tomas Krizek
Browse files

scripts/obs-build.sh: support build for different repos

parent 14502c40
Branches
Tags
1 merge request!1026ci: automate OBS builds and packaging tests
#!/bin/bash
#
# Builds the checked out version in knot-dns-testing OBS repository
# Builds the checked out version in OBS repository
set -o errexit -o nounset -o xtrace
force=false
# Read options
while getopts "f" o; do
case "${o}" in
f)
force=true
;;
*)
;;
esac
done
shift $((OPTIND-1))
obs_repo=$1
# Clean working tree
if [[ $(git status --porcelain | wc -l) -ne 0 ]]; then
if [ "$force" = false ]; then
echo "working tree dirty. force clean with '-f'"
exit 1
fi
git clean -dfx
git reset --hard
echo "working tree dirty: git clean -dfx && git reset --hard"
exit 1
fi
# Create tarball
......@@ -35,6 +19,6 @@ make distcheck AM_DISTCHECK_CONFIGURE_FLAGS="--disable-fastparser"
# Submit to OBS
scripts/make-distrofiles.sh -s
scripts/build-in-obs.sh knot-dns-testing
scripts/build-in-obs.sh $obs_repo
echo "Check results at https://build.opensuse.org/package/show/home:CZ-NIC:knot-dns-testing/knot"
echo "Check results at https://build.opensuse.org/package/show/home:CZ-NIC:$obs_repo/knot"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment