diff options
author | Devan Carpenter <devan@taler.net> | 2024-02-13 12:54:26 -0500 |
---|---|---|
committer | Devan Carpenter <devan@taler.net> | 2024-02-13 12:54:26 -0500 |
commit | 0af9df2704e99405813d689b0bd2c5150ed0944e (patch) | |
tree | 45e5367748ae5717a55f3e96a71c59c9cbbb7c9f | |
parent | b03cdec41490c0b48f87c97fec93bcb3e94eedd0 (diff) | |
download | deployment-0af9df2704e99405813d689b0bd2c5150ed0944e.tar.gz deployment-0af9df2704e99405813d689b0bd2c5150ed0944e.tar.bz2 deployment-0af9df2704e99405813d689b0bd2c5150ed0944e.zip |
add aptly scripts
-rwxr-xr-x | aptly/aptly-cleanup.sh | 6 | ||||
-rwxr-xr-x | aptly/aptly-publish.sh | 13 | ||||
-rwxr-xr-x | aptly/entr.sh | 6 |
3 files changed, 25 insertions, 0 deletions
diff --git a/aptly/aptly-cleanup.sh b/aptly/aptly-cleanup.sh new file mode 100755 index 0000000..85bcd5a --- /dev/null +++ b/aptly/aptly-cleanup.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -ex + +for i in $(aptly snapshot list | grep taler | cut -d'[' -f 2 | cut -d']' -f1) ; do + aptly snapshot drop $i +done diff --git a/aptly/aptly-publish.sh b/aptly/aptly-publish.sh new file mode 100755 index 0000000..dbbb9aa --- /dev/null +++ b/aptly/aptly-publish.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -exou pipefail + +DATESTAMP=$(date -Iseconds) +rm -rf $HOME/garbagecollect +mv $HOME/.aptly/public/pool $HOME/garbagecollect || true +aptly repo drop --force taler-ci-snapshots || true +aptly db cleanup +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 +aptly -gpg-provider="gpg2" publish -architectures="amd64,arm64" switch bookworm "taler-${DATESTAMP}" diff --git a/aptly/entr.sh b/aptly/entr.sh new file mode 100755 index 0000000..3610ec9 --- /dev/null +++ b/aptly/entr.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -xo + +while true ; do + echo incoming/bookworm-taler-ci | entr -n -d /home/aptbuilder/aptly-publish.sh ; sleep 1 || true +done |