Skip to content

Commit efb4ea2

Browse files
authored
Merge pull request #32 from nikic/go-pear
Fetch go-pear.phar from pear.php.net again
2 parents 93764de + 94ec0ee commit efb4ea2

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

bin/compile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
#!/usr/bin/env bash
22

3-
function fetch_pear() {
4-
if [ -n $GITHUB_TOKEN ]; then
5-
auth_flag="-H 'Authorization: token $GITHUB_TOKEN'"
6-
fi
7-
8-
latest_tag=$(curl -sSfL --retry 20 "${auth_flag}" https://api.github.com/repos/pear/pearweb_phars/releases/latest | jq -r .tag_name)
9-
curl -sSfL "${auth_flag}" --retry 20 -O https://raw.githubusercontent.com/pear/pearweb_phars/${latest_tag}/go-pear.phar
10-
11-
if [ ! -f go-pear.phar ]; then
12-
echo "Latest PEAR tarball not found"
13-
exit 1
14-
fi
15-
}
16-
173
set -o errexit
184

195
if [[ ! $VERSION ]] ; then
@@ -35,7 +21,7 @@ php-build -i development "${VERSION}" "${INSTALL_DEST}/${VERSION}"
3521
pushd "${INSTALL_DEST}/${VERSION}"
3622

3723
# pear
38-
fetch_pear
24+
curl -fsSL --retry 20 -O http://pear.php.net/go-pear.phar
3925

4026
env TZ=UTC $TRAVIS_BUILD_DIR/bin/install-pear
4127
rm go-pear.phar

0 commit comments

Comments
 (0)