~sircmpwn/dotfiles

7a059dfceb30e7199e439fe1a6b37c8ff0a0f4f5 — Drew DeVault 26 days ago 59bad12
Rewrite bin/submit-build to use curl

httpie has been annoying and inconsistent for me
1 files changed, 8 insertions(+), 7 deletions(-)

M bin/submit-build
M bin/submit-build => bin/submit-build +8 -7
@@ 9,10 9,11 @@ else
    manifest=.build.yml
fi

exec http \
    "${BUILDSRHT:-https://builds.sr.ht}/api/jobs" \
    manifest=@$manifest \
    tags:='["'$(basename $(pwd))'"]' \
    Authorization:"token $oauth_token"
#echo "Submitted #$build_id"
#xdg-open ${BUILDSRHT:-https://builds.sr.ht}/'~sircmpwn'/job/$build_id
jq -sR '
{
	"tags": ["'"$(basename $(pwd))"'"],
	"manifest": .
}' < "$manifest"\
	| curl --oauth2-bearer "$oauth_token" \
		-H Content-Type:application/json \
		-d @- "${BUILDSRHT:-https://builds.sr.ht}/api/jobs" | jq .