Skip to content

Commit b943ebd

Browse files
committed
fix: Fix regex for downloading semaphore
1 parent 6592173 commit b943ebd

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

scripts/download-semaphore.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
#!/bin/sh
1+
#!/bin/bash
2+
3+
set -xe
4+
5+
target=semaphore
26

37
# Download the latest semaphore release for Travis
48

5-
curl -s https://api.github.com/repos/getsentry/semaphore/releases/latest \
9+
output="$(curl -s https://api.github.com/repos/getsentry/semaphore/releases/latest)"
10+
11+
output="$(echo "$output" \
612
| grep "Linux" \
13+
| grep "download" \
714
| cut -d : -f 2,3 \
8-
| tr -d \" \
9-
| wget -i - -O ./semaphore
15+
| tr -d , \
16+
| tr -d \")"
1017

11-
chmod +x ./semaphore
18+
echo "$output" | wget -i - -O $target
19+
[ -s $target ]
20+
chmod +x $target

0 commit comments

Comments
 (0)