]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
packaging: script to build in obs
authorTomas Krizek <tomas.krizek@nic.cz>
Thu, 22 Feb 2018 12:45:48 +0000 (13:45 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 27 Feb 2018 16:50:22 +0000 (17:50 +0100)
Also triggers OBS build in a dedicated knot-resolver-devel repo in OBS,
which doesn't use the development libraries of knot from master branch.

.gitlab-ci.yml
scripts/build-in-obs.sh [new file with mode: 0755]

index 4c848d2f93885fff9fbb838aeb7a17f8cfd622ca..16966b3bcf5e89361468cf6b8c5c10bad3e37175 100644 (file)
@@ -354,16 +354,8 @@ obs:
   script:
     - scripts/make-distrofiles.sh
     - echo -e "[general]\napiurl = https://api.opensuse.org\n\n[https://api.opensuse.org]\nuser = CZ-NIC\npass = $OBS_PASSWORD" > /root/.oscrc
-    - osc co home:CZ-NIC:knot-devel knot-resolver
-    - cd home\:CZ-NIC\:knot-devel/knot-resolver/
-    - osc del *
-    - cp ../../*.tar.xz ./
-    - cp -rL ../../distro/fedora/* ./
-    - cp -rL ../../distro/arch/* ./
-    - cp ../../distro/debian/*.debian.tar.xz ./
-    - cp ../../distro/debian/knot-resolver.dsc ./
-    - osc addremove
-    - osc ci -n
+    - scripts/build-in-obs.sh knot-devel
+    - scripts/build-in-obs.sh knot-resolver-devel
 
 #arm_build:
 #  image: cznic/armhf-ubuntu:16.04
diff --git a/scripts/build-in-obs.sh b/scripts/build-in-obs.sh
new file mode 100755 (executable)
index 0000000..eec967a
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash -e
+
+# Example usage:
+# scripts/make-distrofiles.sh
+# scripts/build-in-obs.sh knot-resolver-devel
+
+repo=home:CZ-NIC:$1
+
+osc co "$repo" knot-resolver
+cd "$repo/knot-resolver"
+osc del *
+cp ../../*.tar.xz ./
+cp -rL ../../distro/fedora/* ./
+cp -rL ../../distro/arch/* ./
+cp ../../distro/debian/*.debian.tar.xz ./
+cp ../../distro/debian/knot-resolver.dsc ./
+osc addremove
+osc ci -n