diff --git a/.travis.yml b/.travis.yml index 7ff2705..8a9d5b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: c script: asdf plugin-test php https://github.com/odarriba/asdf-php.git before_install: -- echo `curl -u $GITHUB_API_USER:$GITHUB_API_KEY-s https://api.github.com/repos/php/php-src/git/refs/tags` - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install freetype bison27 gettext icu4c jpeg libpng openssl readline homebrew/dupes/zlib curl; fi diff --git a/bin/install b/bin/install index 4d96116..8f051b4 100644 --- a/bin/install +++ b/bin/install @@ -208,38 +208,4 @@ get_php_version() { fi } -# get_target() { -# os=$(uname -s) -# -# # If on OSX (Darwin) then the target is macosx -# if [ $os = "Darwin" ]; then -# echo "macosx" -# else # Otherwise we assume Linux -# echo "linux" -# fi -# } - -#version_5x_or_greater() { -# version=$1 -# IFS='.' read -a version_array <<< "$version" -# major_version="${version_array[0]}" -# -# if (( $major_version >= 5 )); then -# return 0 -# else -# return 1 -# fi -#} - -#version_5_2x_or_greater() { -# version=$1 -# IFS='.' read -a version_array <<< "$version" -# major_minor_version="${version_array[0]}0${version_array[1]}" -# if (( $major_minor_version >= 502 )); then -# return 0 -# else -# return 1 -# fi -#} - install_php $ASDF_INSTALL_TYPE $ASDF_INSTALL_VERSION $ASDF_INSTALL_PATH diff --git a/bin/list-all b/bin/list-all index a1be77e..c0c3511 100755 --- a/bin/list-all +++ b/bin/list-all @@ -1,6 +1,12 @@ #!/usr/bin/env bash -versions=$(curl -s https://api.github.com/repos/php/php-src/git/refs/tags | # Fetch all tags +if [ "$GITHUB_API_USER" = "" ] || [ "$GITHUB_API_KEY" = "" ]; then + auth="" +else + auth="-u $GITHUB_API_USER:$GITHUB_API_KEY" +fi + +versions=$(curl $auth -s https://api.github.com/repos/php/php-src/git/refs/tags | # Fetch all tags grep '"ref":' | # Filter by refs grep 'php-' | # Filter only those related to php-xxxx grep -Ev "beta|alpha|RC" | # Remove betas, alphas and RCs