File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ function fetch_pear() {
4
+ set +o xtrace
5
+ if [ -n $GITHUB_TOKEN ]; then
6
+ auth_flag=" -H 'Authorization: token $GITHUB_TOKEN '"
7
+ fi
8
+
9
+ latest_tag=$( curl -sSfL " ${auth_flag} " https://api.github.com/repos/pear/pearweb_phars/releases/latest | jq -r .tag_name)
10
+ curl -sSfL " ${auth_flag} " --retry 2 -O https://raw.githubusercontent.com/pear/pearweb_phars/${latest_tag} /go-pear.phar
11
+
12
+ if [ ! -f go-pear.phar ]; then
13
+ echo " Latest PEAR tarball not found"
14
+ exit 1
15
+ fi
16
+ set -o xtrace
17
+ }
18
+
3
19
set -o errexit
4
20
5
21
if [[ ! $VERSION ]] ; then
@@ -21,7 +37,8 @@ php-build -i development "${VERSION}" "${INSTALL_DEST}/${VERSION}"
21
37
pushd " ${INSTALL_DEST} /${VERSION} "
22
38
23
39
# pear
24
- curl -fsSL -O http://pear.php.net/go-pear.phar
40
+ fetch_pear
41
+
25
42
env TZ=UTC $TRAVIS_BUILD_DIR /bin/install-pear
26
43
rm go-pear.phar
27
44
" $INSTALL_DEST /$VERSION /bin/pear" config-set php_ini " $INSTALL_DEST /$VERSION /etc/php.ini" system
You can’t perform that action at this time.
0 commit comments