]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
scripts/obs-build.sh: support build for different repos
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 24 May 2019 08:45:59 +0000 (10:45 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 11 Jun 2019 12:10:45 +0000 (14:10 +0200)
scripts/obs-build.sh [new file with mode: 0755]
scripts/obs-testbuild.sh [deleted file]

diff --git a/scripts/obs-build.sh b/scripts/obs-build.sh
new file mode 100755 (executable)
index 0000000..6af89f2
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# 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"
diff --git a/scripts/obs-testbuild.sh b/scripts/obs-testbuild.sh
deleted file mode 100755 (executable)
index e474ff4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-#
-# Builds the checked out version in knot-dns-testing 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))
-
-# 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
-fi
-
-# Create tarball
-scripts/make-dev-archive.sh
-
-# Submit to OBS
-scripts/make-distrofiles.sh -s
-scripts/build-in-obs.sh knot-resolver-testing
-
-echo "Check results at https://build.opensuse.org/package/show/home:CZ-NIC:knot-resolver-testing/knot-resolver"