Skip to content

Commit

Permalink
Remove logging for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Yann Cedric Ngadeu committed Jun 11, 2019
1 parent dd58e8d commit f891ce6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions get-latest-tgf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ ! -d "$TGF_PATH" ]; then
fi

get_local_tgf_version () {
echo "get local tgf : " $TGF
TGF_LOCAL_VERSION=$($TGF --current-version | awk -F\ '{print $2}')
if [ -z "$TGF_LOCAL_VERSION" ]; then
TGF_LOCAL_VERSION=$($TGF --current-version | awk -F\ '{print $2}')
else
Expand All @@ -20,12 +20,12 @@ get_latest_tgf_version () {
if [ -z "$GITHUB_TOKEN" ]
then
echo 'GITHUB_TOKEN is not set.'
fi

fi
TGF_LATEST_VERSION=$(curl --silent https://api.github.com/repos/coveo/tgf/releases/latest?access_token=${GITHUB_TOKEN} | grep tag_name | awk -F\" '{print $4}')

if [ -z "$TGF_LATEST_VERSION" ]
then
then
echo "Could not obtain tgf latest version. (check your GITHUB_TOKEN)"
exit 1
fi
Expand All @@ -48,7 +48,7 @@ install_latest_tgf () {
then
echo 'Installing latest tgf for OSX in' $TGF_PATH '...'
curl -sL "https://github.com/coveo/tgf/releases/download/v"$VERSION"/tgf_"$VERSION"_macOS_64-bits.zip" | bsdtar -xf- -C $TGF_PATH && script_end
else
else
echo 'OS not supported.'
exit 1
fi
Expand All @@ -61,7 +61,7 @@ echo '- tgf version (local):' $TGF_LOCAL_VERSION
echo '- tgf version (latest):' $TGF_LATEST_VERSION

if [[ $TGF_LOCAL_VERSION == $TGF_LATEST_VERSION ]]
then
then
echo 'Local version is up to date.'
else
install_latest_tgf
Expand Down

0 comments on commit f891ce6

Please sign in to comment.