vtk-m2/.gitlab/ci/config/cmake.ps1
Kenneth Moreland 898115a410 Add copyright notice to scipts and configuration files
There are numerous scripts and configuration files defined in the CI setup
and elsewhere that were missing the copyright statement. Add more types
of files to check in the CopyrightStatement test, and update the files
with the appropriate statement.
2023-07-25 11:05:40 -06:00

32 lines
1.2 KiB
PowerShell
Executable File

##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
$erroractionpreference = "stop"
$version = "3.21.1"
$sha256sum = "9fba6df0b89be0dc0377f2e77ca272b3f8c38691fe237699de275ea0c2254242"
$filename = "cmake-$version-windows-x86_64"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
exit 1
}
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
Move-Item -Path "$outdir\$filename" -Destination "$outdir\cmake"