~dricottone/huttese-apk

2ff0e2a7b9e04fbe53399f28e9052d8c5778df62 — Drew DeVault 5 years ago 4b6b1a3
submit-builds: add note with list of packages
1 files changed, 7 insertions(+), 0 deletions(-)

M submit-builds
M submit-builds => submit-builds +7 -0
@@ 24,18 24,25 @@ done
shift $((OPTIND-1))

builds=""
note=""
for target in $*
do
	if [ "$builds" = "" ]
	then
		builds="'${target#sr.ht/}'"
		note="${target#sr.ht/}"
	else
		builds="$builds, '${target#sr.ht/}'"
		if [ "${#note}" -lt 128 ]
		then
			note="$note, ${target#sr.ht/}"
		fi
	fi
done
sed "s/packages: \\[\\]/packages: [$builds]/g" < build.yml | jq -sR '{
			"manifest": .,
			"tags": ["sr.ht-apkbuilds"],
			"note": "'"$note"'"
		}' | curl \
	-H Authorization:"token $oauth_token" \
	-H Content-Type:application/json \