index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-05-04 22:40:29 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-05-04 22:40:29 +0200 |
commit | eda35a90de7ebe44362fcb0444c7be5139a4567d (patch) | |
tree | 7308fbf1381f56a0c5afdd2c5f8e60dc35dab251 /bin/build-packages | |
parent | 3efa223dbe2a7738b11af7c3e8479ff9ec8a40d5 (diff) |
-rwxr-xr-x | bin/build-packages | 37 |
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 ;; |