summaryrefslogtreecommitdiffstats
path: root/scripts/obs-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/obs-build.sh')
-rwxr-xr-xscripts/obs-build.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/obs-build.sh b/scripts/obs-build.sh
new file mode 100755
index 0000000..5b1e33c
--- /dev/null
+++ b/scripts/obs-build.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0-or-later
+# Builds the checked out version in OBS repository
+
+set -o errexit -o nounset -o xtrace
+
+obs_repo=$1
+
+# Clean working tree
+if [[ $(git status --porcelain | wc -l) -ne 0 ]]; then
+ echo "working tree dirty: git clean -dfx && git reset --hard"
+ exit 1
+fi
+
+# Create tarball
+scripts/make-dev-archive.sh
+
+# Submit to OBS
+scripts/make-distrofiles.sh -s
+scripts/build-in-obs.sh $obs_repo
+
+echo "Check results at https://build.opensuse.org/package/show/home:CZ-NIC:$obs_repo/knot-resolver"