test build script super rough draft

This commit is contained in:
Vanessa Yuen 2017-10-31 17:21:13 +08:00
parent aaa8aec946
commit b2a735ef4f

22
test-builds.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
_project=$1
_branch=$2
_circle_token=$3
trigger_build_url=https://circleci.com/api/v1.1/project/github/${_project}/tree/${_branch}?circle-token=${_circle_token}
post_data=$(cat <<EOF
{
"build_parameters": {
"RUN_RELEASE_BUILD": "true",
"CIRCLE_JOB": "electron-linux-arm"
}
}
EOF)
curl \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "${post_data}" \
--request POST ${trigger_build_url}