aboutsummaryrefslogtreecommitdiff
path: root/build-package
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2017-03-08 17:30:32 +0200
committerRiku Voipio <riku.voipio@linaro.org>2017-03-08 15:35:53 +0000
commite937328f93400b51136264f49f4f03d5367ca6db (patch)
tree658422dcec49de3f7e0b765a2ab2258ea931437f /build-package
parent1230f7f08810988c48ee5d3e573ce133eaf835af (diff)
downloadconfigs-e937328f93400b51136264f49f4f03d5367ca6db.tar.gz
build-package-obs: new job
Convert te build-package job to a stub that just submits jobs to OBS. Change-Id: I273726e751913e9f1070925fb9fb064b32657bd6
Diffstat (limited to 'build-package')
-rw-r--r--build-package/builder-obs.sh74
1 files changed, 74 insertions, 0 deletions
diff --git a/build-package/builder-obs.sh b/build-package/builder-obs.sh
new file mode 100644
index 000000000..694a4318e
--- /dev/null
+++ b/build-package/builder-obs.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+set -e
+echo "dist: $dist"
+echo "source: $source"
+echo "repo: $repo"
+echo "appendversion: $appendversion"
+obsrepo=$repo-$dist
+rm -rf *
+
+dget -q -d -u $source
+sourcename=`basename $source|sed -e 's,_.*,,'`
+echo "will send to OBS: $obsrepo $sourcename"
+
+if [ "$backport" = "true" ]; then
+ appendversion=true
+ deltatype=backport
+fi
+
+if [ "$appendversion" = "true" ]; then
+ dpkg-source -x *.dsc work/
+ rm *.dsc
+ cd work
+ dpkg-parsechangelog
+ maint=`dpkg-parsechangelog -SMaintainer`
+ if [[ $maint != *linaro* ]]; then
+ echo "Warning not a linaro maintainer: $maint"
+ export maint="packages@lists.linaro.org"
+ fi
+
+ # Changelog update
+ change=`dpkg-parsechangelog -SChanges`
+ case $change in
+ *Initial*release*)
+ deltatype="new package"
+ ;;
+ *Backport*from*|*Rebuild*for*)
+ deltatype="backport"
+ ;;
+ *Added*patch*)
+ deltatype="patched"
+ ;;
+ *Upstream*snapshot*)
+ deltatype="snapshot"
+ ;;
+ *HACK*)
+ deltatype="hack"
+ ;;
+ *)
+ deltatype="other"
+ ;;
+ esac
+ dch --force-distribution -m -D $dist -llinaro$dist "Linaro CI build: $deltatype"
+ dpkg-buildpackage -S -d
+ cd ..
+fi
+
+dsc=`ls -tr *dsc`
+
+# update existing package
+if osc co $obsrepo $sourcename; then
+ rm -v $obsrepo/$sourcename/$sourcename*||true
+else
+ osc co $obsrepo
+ mkdir -p $obsrepo/$sourcename
+ osc add $obsrepo/$sourcename
+fi
+for file in `dcmd $dsc`;
+do
+ cp $file $obsrepo/$sourcename
+done
+
+osc addremove $obsrepo/$sourcename
+osc ci $obsrepo/$sourcename -m "$BUILD_URL"