summaryrefslogtreecommitdiff
path: root/aptly
diff options
context:
space:
mode:
Diffstat (limited to 'aptly')
-rwxr-xr-xaptly/aptly-cleanup.sh6
-rwxr-xr-xaptly/aptly-publish.sh18
-rwxr-xr-xaptly/entr.sh6
3 files changed, 30 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..07a986f
--- /dev/null
+++ b/aptly/aptly-publish.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -exou pipefail
+
+REPOROOT="${HOME}"/.aptly/public
+DATESTAMP=$(date -Iseconds)
+
+rm -rf "${HOME}"/garbagecollect
+mv "${REPOROOT}"/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}"
+
+# Publish a list of all packages in the repo
+aptly repo show -with-packages taler-ci-snapshots > "${REPOROOT}"/packages.txt
diff --git a/aptly/entr.sh b/aptly/entr.sh
new file mode 100755
index 0000000..6837508
--- /dev/null
+++ b/aptly/entr.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -xo
+
+while true ; do
+ echo "${HOME}/incoming/bookworm-taler-ci" | entr -n -d "${HOME}"/deployment/aptly/aptly-publish.sh ; sleep 1 || true
+done