commit cc64b1717da91ebc0a19811af62374d294c9959a parent 229540d1e4017ef5331dc6dc810a525bde62089e Author: Devan Carpenter <devan@taler.net> Date: Tue, 26 Nov 2024 23:57:17 +0100 aptly: merge publish script for simplicity Diffstat:
| D | aptly/aptly-garbage-collect.sh | | | 14 | -------------- |
| M | aptly/aptly-publish.sh | | | 15 | +++++++++++++++ |
| M | aptly/entr.sh | | | 2 | +- |
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/aptly/aptly-garbage-collect.sh b/aptly/aptly-garbage-collect.sh @@ -1,14 +0,0 @@ -#!/bin/bash - -set -exou pipefail - -REPOROOT="${HOME}"/.aptly/public -DATESTAMP=$(date -Iseconds) - -# move any packages older than 30 days to the archive -mv $(find "${HOME}"/incoming/bookworm-taler-ci/ -mindepth 1 -mtime +30 | xargs echo) archive/ - -rm -rf "${HOME}"/garbagecollect -mv "${REPOROOT}"/pool "${HOME}"/garbagecollect || true -aptly repo drop --force taler-ci-snapshots || true -aptly db cleanup diff --git a/aptly/aptly-publish.sh b/aptly/aptly-publish.sh @@ -6,6 +6,21 @@ REPOROOT="${HOME}"/.aptly/public PUBLISHPATH="${HOME}"/public_nightly_repo DATESTAMP=$(date -Iseconds) +### +### House Keeping +### +# Move any packages older than 30 days to the archive +mv $(find "${HOME}"/incoming/bookworm-taler-ci/ -mindepth 1 -mtime +30 | xargs echo) "${HOME}"/archive/ || true + +rm -rf "${HOME}"/garbagecollect +mv "${REPOROOT}"/pool "${HOME}"/garbagecollect || true +aptly repo drop --force taler-ci-snapshots || true +aptly db cleanup + + +### +### Publishing +### aptly repo create -distribution=bookworm -component=main taler-ci-snapshots aptly repo add taler-ci-snapshots /home/aptbuilder/incoming/bookworm-taler-ci || true aptly snapshot create "taler-${DATESTAMP}" from repo taler-ci-snapshots diff --git a/aptly/entr.sh b/aptly/entr.sh @@ -2,5 +2,5 @@ set -xo while true ; do - echo "${HOME}/incoming/bookworm-taler-ci" | entr -n -d "${HOME}/deployment/aptly/aptly-garbage-collect.sh && ${HOME}/deployment/aptly/aptly-publish.sh" ; sleep 1 || true + echo "${HOME}/incoming/bookworm-taler-ci" | entr -n -d "${HOME}/deployment/aptly/aptly-publish.sh" ; sleep 1 || true done