mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 23:28:57 +00:00
[Ubuntu] Updating release file pattern for Kitware/CMake (#2731)
This commit is contained in:
@@ -10,8 +10,8 @@ if command -v cmake; then
|
|||||||
echo "cmake is already installed"
|
echo "cmake is already installed"
|
||||||
else
|
else
|
||||||
json=$(curl -s "https://api.github.com/repos/Kitware/CMake/releases")
|
json=$(curl -s "https://api.github.com/repos/Kitware/CMake/releases")
|
||||||
latest_tag=$(echo $json | jq -r '.[] | select(.prerelease==false).tag_name' | sort --unique --version-sort | tail -1)
|
latest_tag=$(echo $json | jq -r '.[] | select(.prerelease==false).tag_name' | sort --unique --version-sort | grep -v "rc" | tail -1)
|
||||||
sh_url=$(echo $json | jq -r ".[] | select(.tag_name==\"${latest_tag}\").assets[].browser_download_url | select(endswith(\"Linux-x86_64.sh\"))")
|
sh_url=$(echo $json | jq -r ".[] | select(.tag_name==\"${latest_tag}\").assets[].browser_download_url | select(endswith(\"inux-x86_64.sh\"))")
|
||||||
curl -sL ${sh_url} -o cmakeinstall.sh \
|
curl -sL ${sh_url} -o cmakeinstall.sh \
|
||||||
&& chmod +x cmakeinstall.sh \
|
&& chmod +x cmakeinstall.sh \
|
||||||
&& ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \
|
&& ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \
|
||||||
|
|||||||
Reference in New Issue
Block a user