submit-builds: replace bullshit with hut(1)

This commit is contained in:
Drew DeVault 2024-03-18 11:32:08 +01:00
parent f79050c575
commit f981a08cbe
1 changed files with 2 additions and 20 deletions

View File

@ -44,23 +44,5 @@ do
fi
done
vars="$(sed "s/packages: \\[\\]/packages: [$builds]/g" < $manifest | jq -sR '{
"manifest": .,
"tags": ["sr.ht-apkbuilds"],
"note": "'"$note"'"
}')"
query="$(jq -sR '.' <<"EOF"
mutation SubmitJob($manifest: String!, $tags: [String!]!, $note: String!) {
submit(manifest: $manifest, tags: $tags, note: $note) {
id, tags
}
}
EOF
)"
curl --oauth2-bearer "$bearer_token" \
-H Content-Type:application/json \
-d '{
"query": '"$query"',
"variables": '"$vars"'
}' "$upstream/query" | jq .
sed "s/packages: \\[\\]/packages: [$builds]/g" < $manifest \
| hut builds submit -t "sr.ht-apkbuilds" -n "$note" -v PUBLIC -