mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
[Ubuntu] Always install latest CMake version (#2131)
* [Ubuntu] Always install latest CMake version Should fix #2129 and succeeds #2126 Thanks to @unfor19 for [this solution](https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8#gistcomment-3459923) Please test extensively. * [Ubuntu] CMake.sh: Use jq instead of grep * [Ubuntu] cmake.sh: Extract URL directly from API output Co-authored by @al-cheb, thanks!
This commit is contained in:
@@ -9,7 +9,8 @@ echo "Checking to see if the installer script has already been run"
|
||||
if command -v cmake; then
|
||||
echo "cmake is already installed"
|
||||
else
|
||||
curl -sL https://cmake.org/files/v3.19/cmake-3.19.1-Linux-x86_64.sh -o cmakeinstall.sh \
|
||||
url=$(curl -s https://api.github.com/repos/Kitware/CMake/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux-x86_64.sh"))')
|
||||
curl -sL ${url} -o cmakeinstall.sh \
|
||||
&& chmod +x cmakeinstall.sh \
|
||||
&& ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \
|
||||
&& rm cmakeinstall.sh
|
||||
|
||||
Reference in New Issue
Block a user