index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-05-17 14:44:48 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-05-17 14:45:15 +0200 |
commit | b5e64080699536e7802e1b3dd105032386573f63 (patch) | |
tree | e46848bcc5fac023c0a0f02809038900d6a121e7 /bin/build-packages | |
parent | a689951e9d6ace2e1d617cdd8ab337a60fe56c74 (diff) |
-rwxr-xr-x | bin/build-packages | 24 |
diff --git a/bin/build-packages b/bin/build-packages index 70676d5..c3be5ff 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -110,17 +110,23 @@ while [ ${count} -ne 0 ]; do # build successful ls -1 *.pkg.tar.xz | \ xargs -rn1 gpg --detach-sign - if ! tar -c *.pkg.tar.xz{,.sig} | \ - ssh \ - -i "${master_build_server_identity}" \ - -p "${master_build_server_port}" \ - "${master_build_server_user}@${master_build_server}" \ - 'return-assignment' "${package}" "${git_revision}" "${mod_git_revision}" "${repository}"; then + tar -c 'package.tar' *.pkg.tar.xz{,.sig} + while ! ssh \ + -i "${master_build_server_identity}" \ + -p "${master_build_server_port}" \ + "${master_build_server_user}@${master_build_server}" \ + 'return-assignment' "${package}" "${git_revision}" "${mod_git_revision}" "${repository}" \ + < 'package.tar'; do case $? in 1) - >&2 echo 'I was too slow, the package is outdated. I will continue ...' + # 'return-assignment' was running already + sleep $[15+$RANDOM%30] ;; 2) + >&2 echo 'I was too slow, the package is outdated. I will continue ...' + break + ;; + 3) >& echo "'return-assignment' reports a signature error." exit 1 ;; @@ -128,7 +134,7 @@ while [ ${count} -ne 0 ]; do >&2 echo "unknown return code $? from 'return-assignment'" exit 1 esac - fi + done success=true break fi @@ -179,7 +185,7 @@ while [ ${count} -ne 0 ]; do *) - >&2 echo "ERROR: Unknown exit code $?." + >&2 echo "ERROR: Unknown exit code $? from 'get-assignment'." exit 1 ;; |