submit-builds: replace bullshit with hut(1)
This commit is contained in:
parent
f79050c575
commit
f981a08cbe
|
@ -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 -
|
||||
|
|
Loading…
Reference in New Issue