~sircmpwn/dotfiles

13e081bdcf4397682215e61e577c2bad6ba987fc — Drew DeVault 5 months ago fa8c0e0
submit-build: update token name
1 files changed, 15 insertions(+), 1 deletions(-)

M bin/submit-build
M bin/submit-build => bin/submit-build +15 -1
@@ 2,6 2,19 @@
set -eo pipefail
. ~/.config/sr.ht

execute=true
while getopts x name
do
	case $name in
	x) execute=false;;
	?)
		printf "Usage: %s [-x] [manifest]\n" "$0"
		exit 1
		;;
	esac
done
shift $(($OPTIND - 1))

if [ $# -eq 1 ]
then
    manifest=$1


@@ 12,8 25,9 @@ fi
jq -sR '
{
	"tags": ["'"$(basename $(pwd))"'"],
	"execute": '$execute',
	"manifest": .
}' < "$manifest"\
	| curl --oauth2-bearer "$oauth_token" \
	| curl --oauth2-bearer "$legacy_token" \
		-H Content-Type:application/json \
		-d @- "${BUILDSRHT:-https://builds.sr.ht}/api/jobs" | jq .