We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6592173 commit b943ebdCopy full SHA for b943ebd
scripts/download-semaphore.sh
@@ -1,11 +1,20 @@
1
-#!/bin/sh
+#!/bin/bash
2
+
3
+set -xe
4
5
+target=semaphore
6
7
# Download the latest semaphore release for Travis
8
-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" \
12
| grep "Linux" \
13
+ | grep "download" \
14
| cut -d : -f 2,3 \
- | tr -d \" \
- | wget -i - -O ./semaphore
15
+ | tr -d , \
16
+ | tr -d \")"
17
-chmod +x ./semaphore
18
+echo "$output" | wget -i - -O $target
19
+[ -s $target ]
20
+chmod +x $target
0 commit comments