[Ubuntu] Get toolset value function. (#2435)

* [macOS] Fail Pester tests on error

* return it back

* [Ubuntu] add get_toolset_values function

* added fix

* fix all nitpicks

* try to get rid brackets

* removed brackets.

* pipx-package fix
This commit is contained in:
Darii Nurgaleev
2021-01-15 21:12:26 +07:00
committed by GitHub
parent 68e9c68855
commit 7c6117e6ec
13 changed files with 40 additions and 42 deletions

View File

@@ -13,10 +13,9 @@ sudo gem update --system
apt-get install -y libz-dev openssl libssl-dev
echo "Install Ruby from toolset..."
toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json"
PACKAGE_TAR_NAMES=$(curl -s "https://api.github.com/repos/ruby/ruby-builder/releases/latest" | jq -r '.assets[].name')
TOOLSET_VERSIONS=$(jq -r '.toolcache[] | select(.name | contains("Ruby")) | .versions[]' $toolset)
PLATFORM_VERSION=$(jq -r '.toolcache[] | select(.name | contains("Ruby")) | .platform_version' $toolset)
TOOLSET_VERSIONS=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .versions[]')
PLATFORM_VERSION=$(get_toolset_value '.toolcache[] | select(.name | contains("Ruby")) | .platform_version')
RUBY_PATH="$AGENT_TOOLSDIRECTORY/Ruby"
echo "Check if Ruby hostedtoolcache folder exist..."