File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
images/ubuntu/scripts/build Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2323apt-get install libz-dev openssl libssl-dev
2424
2525echo " Install Ruby from toolset..."
26- package_tar_names=$( curl -fsSL " https://api.github.com/repos/ruby/ruby-builder/releases/latest" | jq -r ' .assets[].name' )
2726toolset_versions=$( get_toolset_value ' .toolcache[] | select(.name | contains("Ruby")) | .versions[]' )
2827platform_version=$( get_toolset_value ' .toolcache[] | select(.name | contains("Ruby")) | .platform_version' )
28+ arch=$( get_toolset_value ' .toolcache[] | select(.name | contains("Ruby")) | .arch' )
2929ruby_path=" $AGENT_TOOLSDIRECTORY /Ruby"
3030
3131echo " Check if Ruby hostedtoolcache folder exist..."
@@ -34,15 +34,15 @@ if [[ ! -d $ruby_path ]]; then
3434fi
3535
3636for toolset_version in ${toolset_versions[@]} ; do
37- package_tar_name=$( echo " $package_tar_names " | grep " ^ruby-${toolset_version} -ubuntu-${platform_version} .tar.gz$" | sort -V | tail -1)
37+ download_url=$( resolve_github_release_asset_url " ruby/ruby-builder" " test(\" ruby-${toolset_version} -ubuntu-${platform_version} -${arch} .tar.gz\" )" " ${toolset_version} " " false" " true" )
38+ package_tar_name=" ${download_url##*/ } "
3839 ruby_version=$( echo " $package_tar_name " | cut -d' -' -f 2)
3940 ruby_version_path=" $ruby_path /$ruby_version "
4041
4142 echo " Create Ruby $ruby_version directory..."
4243 mkdir -p $ruby_version_path
4344
4445 echo " Downloading tar archive $package_tar_name "
45- download_url=" https://github.com/ruby/ruby-builder/releases/download/toolcache/${package_tar_name} "
4646 package_archive_path=$( download_with_retry " $download_url " )
4747
4848 echo " Expand '$package_tar_name ' to the '$ruby_version_path ' folder"
You can’t perform that action at this time.
0 commit comments