Skip to content

Instantly share code, notes, and snippets.

@BanzaiMan
Last active March 27, 2021 04:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BanzaiMan/213dfb9c85c33b3b1f1f9c80da619f99 to your computer and use it in GitHub Desktop.
Save BanzaiMan/213dfb9c85c33b3b1f1f9c80da619f99 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ -s //etc/profile ]]; then
source //etc/profile
fi
if [[ -s $HOME/.bash_profile ]] ; then
source $HOME/.bash_profile
fi
ANSI_RED="\033[31;1m"
ANSI_GREEN="\033[32;1m"
ANSI_RESET="\033[0m"
ANSI_CLEAR="\033[0K"
if [ $TERM = dumb ]; then
unset TERM
fi
: "${SHELL:=/bin/bash}"
: "${TERM:=xterm}"
: "${USER:=travis}"
export SHELL
export TERM
export USER
TRAVIS_TEST_RESULT=
TRAVIS_CMD=
travis_cmd() {
local assert output display retry timing cmd result secure
cmd=$1
TRAVIS_CMD=$cmd
shift
while true; do
case "$1" in
--assert) assert=true; shift ;;
--echo) output=true; shift ;;
--display) display=$2; shift 2;;
--retry) retry=true; shift ;;
--timing) timing=true; shift ;;
--secure) secure=" 2>/dev/null"; shift ;;
*) break ;;
esac
done
if [[ -n "$timing" ]]; then
travis_time_start
fi
if [[ -n "$output" ]]; then
echo "\$ ${display:-$cmd}"
fi
if [[ -n "$retry" ]]; then
travis_retry eval "$cmd $secure"
result=$?
else
if [[ -n "$secure" ]]; then
eval "$cmd $secure" 2>/dev/null
else
eval "$cmd $secure"
fi
result=$?
if [[ -n $secure && $result -ne 0 ]]; then
echo -e "${ANSI_RED}The previous command failed, possibly due to a malformed secure environment variable.${ANSI_CLEAR}
${ANSI_RED}Please be sure to escape special characters such as ' ' and '$'.${ANSI_CLEAR}
${ANSI_RED}For more information, see https://docs.travis-ci.com/user/encryption-keys.${ANSI_CLEAR}"
fi
fi
if [[ -n "$timing" ]]; then
travis_time_finish
fi
if [[ -n "$assert" ]]; then
travis_assert $result
fi
return $result
}
travis_time_start() {
travis_timer_id=$(printf %08x $(( RANDOM * RANDOM )))
travis_start_time=$(travis_nanoseconds)
echo -en "travis_time:start:$travis_timer_id\r${ANSI_CLEAR}"
}
travis_time_finish() {
local result=$?
travis_end_time=$(travis_nanoseconds)
local duration=$(($travis_end_time-$travis_start_time))
echo -en "\ntravis_time:end:$travis_timer_id:start=$travis_start_time,finish=$travis_end_time,duration=$duration\r${ANSI_CLEAR}"
return $result
}
travis_nanoseconds() {
local cmd="date"
local format="+%s%N"
local os=$(uname)
if hash gdate > /dev/null 2>&1; then
cmd="gdate"
elif [[ "$os" = Darwin ]]; then
format="+%s000000000"
fi
$cmd -u $format
}
travis_internal_ruby() {
if ! type rvm &>/dev/null; then
source $HOME/.rvm/scripts/rvm &>/dev/null
fi
local i selected_ruby rubies_array rubies_array_sorted rubies_array_len
rubies_array=( $(
rvm list strings \
| while read -r v; do
if [[ ! "${v}" =~ ^ruby-(2\.[0-2]\.[0-9]|1\.9\.3) ]]; then
continue
fi
v="${v//ruby-/}"
v="${v%%-*}"
echo "$(vers2int "${v}")_${v}"
done
) )
bash_qsort_numeric "${rubies_array[@]}"
rubies_array_sorted=( ${bash_qsort_numeric_ret[@]} )
rubies_array_len="${#rubies_array_sorted[@]}"
i=$(( rubies_array_len - 1 ))
selected_ruby="${rubies_array_sorted[${i}]}"
selected_ruby="${selected_ruby##*_}"
echo "${selected_ruby:-default}"
}
travis_assert() {
local result=${1:-$?}
if [ $result -ne 0 ]; then
echo -e "\n${ANSI_RED}The command \"$TRAVIS_CMD\" failed and exited with $result during $TRAVIS_STAGE.${ANSI_RESET}\n\nYour build has been stopped."
travis_terminate 2
fi
}
travis_result() {
local result=$1
export TRAVIS_TEST_RESULT=$(( ${TRAVIS_TEST_RESULT:-0} | $(($result != 0)) ))
if [ $result -eq 0 ]; then
echo -e "\n${ANSI_GREEN}The command \"$TRAVIS_CMD\" exited with $result.${ANSI_RESET}"
else
echo -e "\n${ANSI_RED}The command \"$TRAVIS_CMD\" exited with $result.${ANSI_RESET}"
fi
}
travis_terminate() {
pkill -9 -P $$ &> /dev/null || true
exit $1
}
travis_wait() {
local timeout=$1
if [[ $timeout =~ ^[0-9]+$ ]]; then
shift
else
timeout=20
fi
local cmd="$@"
local log_file=travis_wait_$$.log
$cmd &>$log_file &
local cmd_pid=$!
travis_jigger $! $timeout $cmd &
local jigger_pid=$!
local result
{
wait $cmd_pid 2>/dev/null
result=$?
ps -p$jigger_pid &>/dev/null && kill $jigger_pid
}
if [ $result -eq 0 ]; then
echo -e "\n${ANSI_GREEN}The command $cmd exited with $result.${ANSI_RESET}"
else
echo -e "\n${ANSI_RED}The command $cmd exited with $result.${ANSI_RESET}"
fi
echo -e "\n${ANSI_GREEN}Log:${ANSI_RESET}\n"
cat $log_file
return $result
}
travis_jigger() {
local cmd_pid=$1
shift
local timeout=$1
shift
local count=0
echo -e "\n"
while [ $count -lt $timeout ]; do
count=$(($count + 1))
echo -ne "Still running ($count of $timeout): $@\r"
sleep 60
done
echo -e "\n${ANSI_RED}Timeout (${timeout} minutes) reached. Terminating \"$@\"${ANSI_RESET}\n"
kill -9 $cmd_pid
}
travis_retry() {
local result=0
local count=1
while [ $count -le 3 ]; do
[ $result -ne 0 ] && {
echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of 3.${ANSI_RESET}\n" >&2
}
"$@"
result=$?
[ $result -eq 0 ] && break
count=$(($count + 1))
sleep 1
done
[ $count -gt 3 ] && {
echo -e "\n${ANSI_RED}The command \"$@\" failed 3 times.${ANSI_RESET}\n" >&2
}
return $result
}
travis_fold() {
local action=$1
local name=$2
echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}"
}
decrypt() {
echo $1 | base64 -d | openssl rsautl -decrypt -inkey $HOME/.ssh/id_rsa.repo
}
vers2int() {
printf '1%03d%03d%03d%03d' $(echo "$1" | tr '.' ' ')
}
bash_qsort_numeric() {
local pivot i smaller=() larger=()
bash_qsort_numeric_ret=()
(($#==0)) && return 0
pivot=${1}
shift
for i; do
if [[ ${i%%_*} -lt ${pivot%%_*} ]]; then
smaller+=( "$i" )
else
larger+=( "$i" )
fi
done
bash_qsort_numeric "${smaller[@]}"
smaller=( "${bash_qsort_numeric_ret[@]}" )
bash_qsort_numeric "${larger[@]}"
larger=( "${bash_qsort_numeric_ret[@]}" )
bash_qsort_numeric_ret=( "${smaller[@]}" "$pivot" "${larger[@]}" )
}
if [[ -f /etc/apt/sources.list.d/rabbitmq-source.list ]] ; then
sudo rm -f /etc/apt/sources.list.d/rabbitmq-source.list
fi
mkdir -p $HOME/build
cd $HOME/build
travis_fold start system_info
echo -e "\033[33;1mBuild system information\033[0m"
echo -e "Build language: php"
echo -e "Build group: stable"
echo -e "Build dist: trusty"
echo -e "Build id: 539364"
echo -e "Job id: 210745527"
if [[ -f /usr/share/travis/system_info ]]; then
cat /usr/share/travis/system_info
fi
travis_fold end system_info
echo
sudo rm -rf /var/lib/apt/lists/*
for f in $(grep -l rwky/redis /etc/apt/sources.list.d/*); do
sed 's,rwky/redis,rwky/ppa,g' $f > /tmp/${f##**/}
sudo mv /tmp/${f##**/} /etc/apt/sources.list.d
done
sudo apt-get update -qq 2>&1 >/dev/null
export PATH=$(echo $PATH | sed -e 's/::/:/g')
export PATH=$(echo -n $PATH | perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, scalar <>))')
echo "options rotate
options timeout:1
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 208.67.222.222
nameserver 208.67.220.220
" | sudo tee /etc/resolv.conf &> /dev/null
sudo sed -e 's/^\(127\.0\.0\.1.*\)$/\1 '`hostname`'/' -i'.bak' /etc/hosts
test -f /etc/mavenrc && sudo sed -e 's/M2_HOME=\(.\+\)$/M2_HOME=${M2_HOME:-\1}/' -i'.bak' /etc/mavenrc
if [ $(command -v sw_vers) ]; then
echo "Fix WWDRCA Certificate"
sudo security delete-certificate -Z 0950B6CD3D2F37EA246A1AAA20DFAADBD6FE1F75 /Library/Keychains/System.keychain
wget -q https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
sudo security add-certificates -k /Library/Keychains/System.keychain AppleWWDRCA.cer
fi
grep '^127\.0\.0\.1' /etc/hosts | sed -e 's/^127\.0\.0\.1 \(.*\)/\1/g' | sed -e 's/localhost \(.*\)/\1/g' | tr "\n" " " > /tmp/hosts_127_0_0_1
sed '/^127\.0\.0\.1/d' /etc/hosts > /tmp/hosts_sans_127_0_0_1
cat /tmp/hosts_sans_127_0_0_1 | sudo tee /etc/hosts > /dev/null
echo -n "127.0.0.1 localhost " | sudo tee -a /etc/hosts > /dev/null
cat /tmp/hosts_127_0_0_1 | sudo tee -a /etc/hosts > /dev/null
# apply :home_paths
for path_entry in $HOME/.local/bin $HOME/bin ; do
if [[ ${PATH%%:*} != $path_entry ]] ; then
export PATH="$path_entry:$PATH"
fi
done
if [ ! $(uname|grep Darwin) ]; then echo update_initramfs=no | sudo tee -a /etc/initramfs-tools/update-initramfs.conf > /dev/null; fi
if [[ "$(sw_vers -productVersion 2>/dev/null | cut -d . -f 2)" -lt 12 ]]; then
mkdir -p $HOME/.ssh
chmod 0700 $HOME/.ssh
touch $HOME/.ssh/config
echo -e "Host *
UseRoaming no
" | cat - $HOME/.ssh/config > $HOME/.ssh/config.tmp && mv $HOME/.ssh/config.tmp $HOME/.ssh/config
fi
function travis_debug() {
echo -e "\033[31;1mThe debug environment is not available. Please contact support.\033[0m"
false
}
if [[ $(command -v sw_vers) ]]; then
travis_cmd rvm\ use --echo
fi
if [[ -L /usr/lib/jvm/java-8-oracle-amd64 ]]; then
echo -e "Removing symlink /usr/lib/jvm/java-8-oracle-amd64"
travis_cmd sudo\ rm\ -f\ /usr/lib/jvm/java-8-oracle-amd64 --echo
if [[ -f $HOME/.jdk_switcher_rc ]]; then
echo -e "Reload jdk_switcher"
travis_cmd source\ \$HOME/.jdk_switcher_rc --echo
fi
if [[ -f /opt/jdk_switcher/jdk_switcher.sh ]]; then
echo -e "Reload jdk_switcher"
travis_cmd source\ /opt/jdk_switcher/jdk_switcher.sh --echo
fi
fi
export GIT_ASKPASS=echo
travis_fold start git.checkout
if [[ ! -d travis-ci/php-src-builder/.git ]]; then
travis_cmd git\ clone\ --depth\=50\ --branch\=default\ https://github.com/travis-ci/php-src-builder.git\ travis-ci/php-src-builder --assert --echo --retry --timing
if [[ $? -ne 0 ]]; then
echo -e "\033[31;1mFailed to clone from GitHub.\033[0m"
echo -e "Checking GitHub status (https://status.github.com/api/last-message.json):"
curl -sL https://status.github.com/api/last-message.json | jq -r .[]
fi
else
travis_cmd git\ -C\ travis-ci/php-src-builder\ fetch\ origin --assert --echo --retry --timing
travis_cmd git\ -C\ travis-ci/php-src-builder\ reset\ --hard --assert --echo
fi
rm -f $HOME/.netrc
travis_cmd cd\ travis-ci/php-src-builder --echo
travis_cmd git\ checkout\ -qf\ 1560b48abd62bb744953031f69d8f87988a9cffb --assert --echo
travis_fold end git.checkout
if [[ -f .gitmodules ]]; then
travis_fold start git.submodule
echo Host\ github.com'
'\ StrictHostKeyChecking\ no'
' >> ~/.ssh/config
travis_cmd git\ submodule\ update\ --init\ --recursive --assert --echo --retry --timing
travis_fold end git.submodule
fi
rm -f ~/.ssh/source_rsa
travis_fold start apt
echo -e "\033[33;1mInstalling APT Packages (BETA)\033[0m"
travis_cmd export\ DEBIAN_FRONTEND\=noninteractive --echo
travis_cmd sudo\ -E\ apt-get\ -yq\ update\ \&\>\>\ \~/apt-get-update.log --echo --timing
travis_cmd sudo\ -E\ apt-get\ -yq\ --no-install-suggests\ --no-install-recommends\ --force-yes\ install\ libcurl4-gnutls-dev --echo --timing
result=$?
if [[ $result -ne 0 ]]; then
travis_fold start apt-get.diagnostics
echo -e "\033[31;1mapt-get install failed\033[0m"
travis_cmd cat\ \~/apt-get-update.log --echo
travis_fold end apt-get.diagnostics
TRAVIS_CMD='sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install libcurl4-gnutls-dev'
travis_assert $result
fi
travis_fold end apt
travis_fold start services
travis_cmd sudo\ service\ docker\ start --echo --timing
sleep 3
travis_fold end services
export PS4=+
travis_cmd echo
echo -e "\033[33;1mThis job is running on container-based infrastructure, which does not allow use of 'sudo', setuid and setguid executables.\033[0m"
echo -e "\033[33;1mIf you require sudo, add 'sudo: required' to your .travis.yml\033[0m"
echo -e "\033[33;1mSee https://docs.travis-ci.com/user/workers/container-based-infrastructure/ for details.\033[0m"
sudo -n sh -c "sed -e 's/^%.*//' -i.bak /etc/sudoers && rm -f /etc/sudoers.d/travis && find / -perm -4000 -exec chmod a-s {} \; 2>/dev/null"
export TRAVIS=true
export CI=true
export CONTINUOUS_INTEGRATION=true
export PAGER=cat
export HAS_JOSH_K_SEAL_OF_APPROVAL=true
export TRAVIS_ALLOW_FAILURE=false
export TRAVIS_EVENT_TYPE=push
export TRAVIS_PULL_REQUEST=false
export TRAVIS_SECURE_ENV_VARS=true
export TRAVIS_BUILD_ID=539364
export TRAVIS_BUILD_NUMBER=1792
export TRAVIS_BUILD_DIR=$HOME/build/travis-ci/php-src-builder
export TRAVIS_JOB_ID=210745527
export TRAVIS_JOB_NUMBER=1792.1
export TRAVIS_BRANCH=default
export TRAVIS_COMMIT=1560b48abd62bb744953031f69d8f87988a9cffb
export TRAVIS_COMMIT_MESSAGE=$(git log --format=%B -n 1)
export TRAVIS_COMMIT_RANGE=051be52e855757dba10a42774cd83cb4bb187e97...1560b48abd62bb744953031f69d8f87988a9cffb
export TRAVIS_REPO_SLUG=travis-ci/php-src-builder
export TRAVIS_OS_NAME=linux
export TRAVIS_LANGUAGE=php
export TRAVIS_TAG=''
export TRAVIS_SUDO=false
export TRAVIS_PULL_REQUEST_BRANCH=''
export TRAVIS_PULL_REQUEST_SHA=''
export TRAVIS_PULL_REQUEST_SLUG=''
echo -e "\033[33;1mSetting environment variables from .travis.yml\033[0m"
travis_cmd export\ VERSION\=7.0snapshot --echo
travis_cmd export\ ALIAS\=\$VERSION --echo
travis_cmd export\ ICU_RELEASE\=57.1 --echo
travis_cmd export\ ICU_INSTALL_DIR\=\$HOME/.phpenv/versions/\$VERSION --echo
travis_cmd export\ RELEASE\=trusty --echo
echo
export TRAVIS_PHP_VERSION=5.6
travis_cmd phpenv\ global\ 5.6\ 2\>/dev/null --echo --timing
if [[ $? -ne 0 ]]; then
echo -e "\033[33;1m5.6 is not pre-installed; installing\033[0m"
if [[ $(uname) = 'Linux' ]]; then
travis_host_os=$(lsb_release -is | tr 'A-Z' 'a-z')
travis_rel_version=$(lsb_release -rs)
elif [[ $(uname) = 'Darwin' ]]; then
travis_host_os=osx
travis_rel=$(sw_vers -productVersion)
travis_rel_version=${travis_rel%*.*}
fi
archive_url=https://s3.amazonaws.com/travis-php-archives/binaries/${travis_host_os}/${travis_rel_version}/$(uname -m)/php-5.6.tar.bz2
echo -e "\033[33;1mDownloading archive: ${archive_url}\033[0m"
travis_cmd curl\ -s\ -o\ archive.tar.bz2\ \$archive_url\ \&\&\ tar\ xjf\ archive.tar.bz2\ --directory\ / --echo --timing
travis_cmd rm\ -f\ archive.tar.bz2 --assert --timing
fi
travis_cmd phpenv\ global\ 5.6 --assert --echo --timing
phpenv rehash
travis_cmd composer\ self-update\ 1.0.0 --echo --timing
travis_cmd composer\ self-update --echo --timing
travis_cmd php\ --version --echo
travis_cmd composer\ --version --echo
echo -e "${ANSI_RESET}"
travis_fold start install.1
travis_cmd sudo\ apt-get\ update\ -qq --assert --echo --timing
travis_fold end install.1
travis_fold start install.2
travis_cmd sudo\ apt-get\ install\ expect --assert --echo --timing
travis_fold end install.2
travis_fold start install.3
travis_cmd if\ \[\[\ \!\ -d\ \$HOME/.php-build\ \]\]\;\ then\ git\ clone\ https://github.com/php-build/php-build.git\ \$HOME/.php-build\;\ fi --assert --echo --timing
travis_fold end install.3
travis_fold start install.4
travis_cmd rm\ -rf\ \$HOME/.phpenv --assert --echo --timing
travis_fold end install.4
travis_fold start install.5
travis_cmd git\ clone\ \'https://github.com/phpenv/phpenv.git\'\ \$HOME/.phpenv --assert --echo --timing
travis_fold end install.5
travis_fold start install.6
travis_cmd eval\ \"\$\(\$HOME/.phpenv/bin/phpenv\ init\ -\)\" --assert --echo --timing
travis_fold end install.6
travis_fold start install.7
travis_cmd pushd\ \$HOME/.php-build --assert --echo --timing
travis_fold end install.7
travis_fold start install.8
travis_cmd git\ reset\ --hard\ HEAD --assert --echo --timing
travis_fold end install.8
travis_fold start install.9
travis_cmd git\ checkout\ master --assert --echo --timing
travis_fold end install.9
travis_fold start install.10
travis_cmd git\ pull --assert --echo --timing
travis_fold end install.10
travis_fold start install.11
travis_cmd popd --assert --echo --timing
travis_fold end install.11
travis_fold start install.12
travis_cmd ./bin/install-icu --assert --echo --timing
travis_fold end install.12
travis_fold start install.13
travis_cmd cp\ default_configure_options.\$RELEASE\ \$HOME/.php-build/share/php-build/default_configure_options --assert --echo --timing
travis_fold end install.13
travis_fold start install.14
travis_cmd if\ \[\[\ \$\(lsb_release\ -cs\)\ \=\ \"trusty\"\ \]\]\;\ then'
'\ \ sudo\ ln\ /usr/include/x86_64-linux-gnu/gmp.h\ /usr/include/gmp.h'
'\ \ sudo\ ln\ -s\ /usr/lib/x86_64-linux-gnu/libldap_r.so\ /usr/lib/libldap_r.so'
'\ \ sudo\ ln\ -s\ /usr/lib/x86_64-linux-gnu/libldap.so\ /usr/lib/libldap.so'
'\ \ sudo\ ln\ -s\ /usr/lib/x86_64-linux-gnu/libldap.a\ /usr/lib/libldap.a'
'\ \ sudo\ ln\ -s\ /usr/lib/x86_64-linux-gnu/liblber.so\ /usr/lib/liblber.so'
'fi'
' --assert --echo --timing
travis_fold end install.14
travis_fold start before_script.1
travis_cmd export\ LSB_RELEASE\=\$\{LSB_RELEASE:-\$\(lsb_release\ -rs\ \|\|\ echo\ \$\{\$\(sw_vers\ -productVersion\)\%\*.\*\}\)\} --assert --echo --timing
travis_fold end before_script.1
travis_fold start before_script.2
travis_cmd export\ OS_NAME\=\$\{OS_NAME:-\$\(lsb_release\ -is\ \|\ tr\ \"A-Z\"\ \"a-z\"\ \|\|\ echo\ \"osx\"\)\} --assert --echo --timing
travis_fold end before_script.2
travis_fold start before_script.3
travis_cmd export\ ARCH\=\$\{ARCH:-\$\(uname\ -m\)\} --assert --echo --timing
travis_fold end before_script.3
travis_fold start before_script.4
travis_cmd export\ INSTALL_DEST\=\$\{INSTALL_DEST:-\$HOME/.phpenv/versions\} --assert --echo --timing
travis_fold end before_script.4
travis_fold start before_script.5
travis_cmd __dots\(\)\ \{\ while\ true\ \;\ do\ echo\ -en\ .\ \;\ sleep\ 30\ \;\ done\ \}\ \;\ __dots\ \& --assert --echo --timing
travis_fold end before_script.5
travis_cmd cat\ \$HOME/.php-build/share/php-build/default_configure_options --echo --timing
travis_result $?
travis_cmd ./bin/compile\ \&\&'
'./bin/compile-extension-redis\ \&\&'
'\(./bin/compile-extension-mongo\;'
'./bin/compile-extension-mongodb\)\ \&\&'
'./bin/compile-extension-amqp\ \&\&'
'./bin/compile-extension-apcu\ \&\&'
'./bin/compile-extension-zmq\ \&\&'
'\(./bin/compile-extension-memcache\;'
'./bin/compile-extension-memcached\)\ \&\&'
'sed\ -i\ \'/\^extension\=/d\'\ \$INSTALL_DEST/\$VERSION/etc/php.ini'
' --echo --timing
travis_result $?
if [[ $TRAVIS_TEST_RESULT = 0 ]]; then
travis_fold start after_success.1
travis_cmd ARTIFACTS_KEY\=\'\'\ ARTIFACTS_SECRET\=\'\'\ ARTIFACTS_BUCKET\=\'\'\ ARTIFACTS_PERMISSIONS\=\'\'\ \$INSTALL_DEST/\$VERSION/bin/php\ -i --echo --timing
travis_fold end after_success.1
travis_fold start after_success.2
travis_cmd \$INSTALL_DEST/\$VERSION/bin/php\ -m --echo --timing
travis_fold end after_success.2
travis_fold start after_success.3
travis_cmd ldd\ \$INSTALL_DEST/\$VERSION/bin/php --echo --timing
travis_fold end after_success.3
travis_fold start after_success.4
travis_cmd \$INSTALL_DEST/\$VERSION/bin/pecl\ config-show --echo --timing
travis_fold end after_success.4
travis_fold start after_success.5
travis_cmd ./bin/archive --echo --timing
travis_fold end after_success.5
fi
if [[ $TRAVIS_TEST_RESULT != 0 ]]; then
travis_fold start after_failure
travis_cmd cat\ /tmp/php-build.\*.log --echo --timing
travis_fold end after_failure
fi
echo -e "\nDone. Your build exited with $TRAVIS_TEST_RESULT."
travis_terminate $TRAVIS_TEST_RESULT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment