Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-05-04 22:40:29 +0200
committerErich Eckner <git@eckner.net>2017-05-04 22:40:29 +0200
commiteda35a90de7ebe44362fcb0444c7be5139a4567d (patch)
tree7308fbf1381f56a0c5afdd2c5f8e60dc35dab251 /bin/build-packages
parent3efa223dbe2a7738b11af7c3e8479ff9ec8a40d5 (diff)
main parts should work - still a lot of TODOs left :-)
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages37
1 files changed, 27 insertions, 10 deletions
diff --git a/bin/build-packages b/bin/build-packages
index d4fc8b9..0fc20f7 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -6,9 +6,7 @@
# TODOs:
# include package customizations
-# handle failed builds
-# actually upload the package
-# use different build commands for different repositories
+# use different build commands for different repositories - do we need this actually?
# sign packages
. "${0%/*}/../conf/default.conf"
@@ -49,13 +47,32 @@ while true; do
exit 1
fi
- (
- cd "${PKGBUILD%/*}"
- staging-i686-build
- )
- # imagine a blinking cursor here
- >&2 echo 'whoops, end of program reached.'
- exit 42
+ cd "${PKGBUILD%/*}"
+ success=false
+ for parameters in '' '-c'; do
+ rm -f *.pkg.tar.xz
+ if staging-i686-build ${parameters}; then
+ # build successful
+ tar -c *.pkg.tar.xz | \
+ ssh \
+ -i "${master_build_server_identity}" \
+ -p "${master_build_server_port}" \
+ "${master_build_server_user}@${master_build_server}" \
+ 'return-assignment' "${package}" "${git_revision}" "${repository}"
+ success=true
+ break
+ fi
+ done
+
+ if ! ${success}; then
+ ssh \
+ -i "${master_build_server_identity}" \
+ -p "${master_build_server_port}" \
+ "${master_build_server_user}@${master_build_server}" \
+ 'return-assignment' "${package}" "${git_revision}" "${repository}" 'ERROR'
+ fi
+
+ continue
;;