diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-05-14 18:36:04 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-05-22 15:34:14 (GMT) |
commit | 02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7 (patch) | |
tree | 567b777f6fa3123c6cea3f450fafee56dc4076a2 /.gitlab/ci/cmake.sh | |
parent | a1b1fc611bc8aeb519b79b3e1b86ce4e4dbc55e9 (diff) | |
download | CMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.zip CMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.tar.gz CMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.tar.bz2 |
gitlab-ci: add a macos builder
Diffstat (limited to '.gitlab/ci/cmake.sh')
-rwxr-xr-x | .gitlab/ci/cmake.sh | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/.gitlab/ci/cmake.sh b/.gitlab/ci/cmake.sh index 4b2f53f..658a62a 100755 --- a/.gitlab/ci/cmake.sh +++ b/.gitlab/ci/cmake.sh @@ -3,14 +3,38 @@ set -e readonly version="3.17.2" -readonly sha256sum="dc57f3cc448ca67fc8776b4ad4c22b087b9c6a8e459938b9622b8c7f4ef6b21e" -readonly filename="cmake-$version-Linux-x86_64" + +case "$( uname -s )" in + Linux) + shatool="sha256sum" + sha256sum="dc57f3cc448ca67fc8776b4ad4c22b087b9c6a8e459938b9622b8c7f4ef6b21e" + platform="Linux" + ;; + Darwin) + shatool="shasum -a 256" + sha256sum="139500e20b080444fcafe57f24f57248c691c5187cce6695bee2b9aad6792c7d" + platform="Darwin" + ;; + *) + echo "Unrecognized platform $( uname -s )" + exit 1 + ;; +esac +readonly shatool +readonly sha256sum +readonly platform + +readonly filename="cmake-$version-$platform-x86_64" readonly tarball="$filename.tar.gz" cd .gitlab echo "$sha256sum $tarball" > cmake.sha256sum curl -OL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -sha256sum --check cmake.sha256sum +$shatool --check cmake.sha256sum tar xf "$tarball" mv "$filename" cmake + +if [ "$( uname -s )" = "Darwin" ]; then + ln -s CMake.app/Contents/bin cmake/bin +fi |