Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions bin/compile
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
#!/usr/bin/env bash

function fetch_pear() {
if [ -n $GITHUB_TOKEN ]; then
auth_flag="-H 'Authorization: token $GITHUB_TOKEN'"
fi

latest_tag=$(curl -sSfL --retry 20 "${auth_flag}" https://api.github.com/repos/pear/pearweb_phars/releases/latest | jq -r .tag_name)
curl -sSfL "${auth_flag}" --retry 20 -O https://raw.githubusercontent.com/pear/pearweb_phars/${latest_tag}/go-pear.phar

if [ ! -f go-pear.phar ]; then
echo "Latest PEAR tarball not found"
exit 1
fi
}

set -o errexit

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

# pear
fetch_pear
curl -fsSL --retry 20 -O http://pear.php.net/go-pear.phar

env TZ=UTC $TRAVIS_BUILD_DIR/bin/install-pear
rm go-pear.phar
Expand Down