2 files changed, 45 insertions(+), 34 deletions(-)
R sr.ht/{buildall.yml => build.yml}
A sr.ht/submit-builds
R sr.ht/buildall.yml => sr.ht/build.yml +1 -34
@@ 9,40 9,7 @@ packages:
environment:
repo_server: deploy@mirror.sr.ht
repo_path: /var/www/mirror.sr.ht/alpine/sr.ht/x86_64
- packages:
- - fcgiwrap
- - py-alembic
- - py-cssselect2
- - py-editor
- - py-misaka
- - py-qrcode
- - py-tinycss2
- - py-weasyprint
- - py3-amqp
- - py3-anyjson
- - py3-arrow
- - py3-billiard
- - py3-bleach
- - py3-case
- - py3-celery
- - py3-colour
- - py3-furl
- - py3-html5lib
- - py3-humanize
- - py3-infinity
- - py3-intervals
- - py3-kombu
- - py3-nose
- - py3-orderedmultidict
- - py3-passlib
- - py3-pgpy
- - py3-pyotp
- - py3-redis
- - py3-sqlalchemy-utils
- - py3-sshpubkeys
- - py3-stripe
- - py3-vine
- - py3-webencodings
+ packages: []
sources:
- https://git.sr.ht/~sircmpwn/sr.ht-apkbuilds
secrets:
A sr.ht/submit-builds => sr.ht/submit-builds +44 -0
@@ 0,0 1,44 @@
+#!/bin/sh
+if [ -e ~/.config/sr.ht ]
+then
+ . ~/.config/sr.ht
+fi
+
+upstream=https://builds.sr.ht
+
+while getopts u:t:h flag
+do
+ case $flag in
+ u)
+ upstream="$OPTARG"
+ ;;
+ t)
+ token="$OPTARG"
+ ;;
+ h)
+ echo "Usage: $0 [-u https://upstream...] [-t oauth token] <packages...>"
+ exit 0
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
+builds=""
+for target in $*
+do
+ if [ "$builds" = "" ]
+ then
+ builds="'$target'"
+ else
+ builds="$builds, '$target'"
+ fi
+done
+sed "s/packages: \\[\\]/packages: [$builds]/g" < build.yml | jq -sR '{
+ "manifest": .,
+ "tags": ["sr.ht-apkbuilds"],
+ }' | curl \
+ -H Authorization:"token $oauth_token" \
+ -H Content-Type:application/json \
+ -X POST \
+ -d @- $upstream/api/jobs
+printf '\n'