diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2022-10-31 18:20:08 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2022-10-31 18:20:08 -0400 |
commit | c85eefc850f700c4a3ad97a7e53b85d2e69d972d (patch) | |
tree | fdf53b6b7b4b1be3a5f0740b6cb0ea1ddea76f84 | |
parent | 268e4ea9b7300d45385731c49377071d011e3605 (diff) |
wip - remote ipc - auto-publish whitelistdevelopment
-rwxr-xr-x | .local/bin/autobuild.sh | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/.local/bin/autobuild.sh b/.local/bin/autobuild.sh index 1ffc8fb..ff72bea 100755 --- a/.local/bin/autobuild.sh +++ b/.local/bin/autobuild.sh @@ -19,6 +19,10 @@ export PATH # because of setuid safety, path may be currently un-exported declare -r PKGVER_RX='([0-9]{8})(\.[0-9]+)?' +declare -r -A AUTO_PUBLISH_PKGS=( ['libre/your-freedom']=1 + ['libre/your-freedom_emu']=1 + ['nonsystemd/your-init-freedom']=1 + ['libre/parabola-keyring']=1 ) declare -r -A FORCE_REBUILD_PKGS=( ['libre/parabola-keyring']=1 ) declare -r -A NETWORKED_BUILD_PKGS=( ['libre/parabola-keyring']=1 ) @@ -139,21 +143,37 @@ Main() # (cli-args) return 0 fi - # Update the PKGBUILD - sed -e "s|^pkgver=.*|pkgver=${newpkgver}|" \ - -e "s|^_gitver=.*|_gitver=${newgitver}|" \ - -e 's|^pkgrel=.*|pkgrel=1|' -i PKGBUILD - updpkgsums - git add PKGBUILD - git commit -m "Update ${repo_pkg}" - - # Build and publish the package upgrade - WithTTY sudo librechroot -n autobuilder -l root update - WithTTY sudo librechroot -n autobuilder sync - WithTTY sudo libremakepkg -n autobuilder $(LibremakepkgArgs ${repo_pkg}) - librestage - git push - librerelease + if (( ${AUTO_PUBLISH_PKGS[ ${repo_pkg} ]} )) + then msg "[${repo_pkg}]: AUTO_PUBLISH rebuild" + + # Update the PKGBUILD + sed -e "s|^pkgver=.*|pkgver=${newpkgver}|" \ + -e "s|^_gitver=.*|_gitver=${newgitver}|" \ + -e 's|^pkgrel=.*|pkgrel=1|' -i PKGBUILD + updpkgsums + git add PKGBUILD + git commit -m "Update ${repo_pkg}" + + # Build and publish the package upgrade + WithTTY sudo librechroot -n autobuilder -l root update + WithTTY sudo librechroot -n autobuilder sync + WithTTY sudo libremakepkg -n autobuilder $(LibremakepkgArgs ${repo_pkg}) + librestage + git push + librerelease + else msg "[${repo_pkg}]: Queueing remote build" + +# readonly BUILD_REMOTE=beefcacke +readonly IPC_FILE=/home/autobuilder/.autobuild_queue.ipc # TODO: IPC_FILE on beefcacke +readonly BUILD_IP=beefcacke.parabola.nu +readonly REMOTE_ABS_DIR=/var/lib/archbuild/abslibre + local remote_cmd="echo ${repo_pkg} $(LibremakepkgArgs ${repo_pkg}) >> ${IPC_FILE}" +# m="$(printf "${remote_cmd_fmt}" ${repo_pkg})" +# git remote add ${BUILD_REMOTE} ssh://git@git.parabola.nu:1863/~git/abslibre.git +# scp ./* autobuilder@${BUILD_IP}:"${REMOTE_ABS_DIR}/${repo_pkg}/" + ssh autobuilder@${BUILD_IP}:"${REMOTE_ABS_DIR}/${repo_pkg}/" "${remote_cmd}" +# git push -f ${BUILD_REMOTE} master:build && + fi } |