Fix credential usage.

This commit is contained in:
Óscar de Arriba
2016-10-16 20:47:20 +02:00
parent 8f9d5f6981
commit 7bb4cae6da
3 changed files with 7 additions and 36 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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