File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 2
2
set -eu
3
3
set -o pipefail
4
4
5
+ if [ -z " ${TPS_HOSTNAME:- } " ]; then
6
+ TPS_HOSTNAME=" tps.heroku.tools"
7
+ fi
8
+
5
9
if [ -z " ${TPS_API_TOKEN:- } " ]; then
6
10
echo " Requires environment variable: TPS_API_TOKEN" >&2
7
11
exit 1
23
27
response_status=0
24
28
25
29
tpsGetLock () {
26
- response_status=" $( curl --write-out ' %{http_code}' \
30
+ response_status=" $( curl --silent \
31
+ --write-out ' %{http_code}' \
27
32
-X PUT \
28
- -H " Accept: application/json " \
33
+ -H " Accept: */* " \
29
34
-H " Content-Type: application/json" \
30
- -H " Authorization: Token ${TPS_API_TOKEN} " \
35
+ -H " Authorization: Bearer ${TPS_API_TOKEN} " \
31
36
-d " {\" lock\" : {\" sha\" : \" ${release_sha} \" , \" component_slug\" : \" ${component_slug} \" }}" \
32
- https://tps.heroku.tools /api/ctc) "
37
+ https://${TPS_HOSTNAME} /api/ctc) "
33
38
}
34
39
35
- echo " Requesting deployment lock from tps.heroku.tools …" >&2
40
+ echo " Requesting deployment lock from ${TPS_HOSTNAME} …" >&2
36
41
retry_count=0
37
42
set +e
38
43
tpsGetLock
You can’t perform that action at this time.
0 commit comments