summaryrefslogtreecommitdiffstats
path: root/.gitlab
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-03-21 20:38:36 (GMT)
committerBrad King <brad.king@kitware.com>2024-03-24 19:26:39 (GMT)
commitcfe5bbdc54d59833047689ad416466d7fd9073f1 (patch)
treeb2a75f82500108260a504efffb500fee5254fc09 /.gitlab
parentc8e2694679c2be02bbd3d8dbb98278b2ee977147 (diff)
downloadCMake-cfe5bbdc54d59833047689ad416466d7fd9073f1.zip
CMake-cfe5bbdc54d59833047689ad416466d7fd9073f1.tar.gz
CMake-cfe5bbdc54d59833047689ad416466d7fd9073f1.tar.bz2
ci: Add scripts to provide WiX 4 package on Windows
Run `.gitlab/ci/repackage/wix.ps1` with `-version 4.0.4` and host the package file ourselves.
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/.gitignore1
-rwxr-xr-x.gitlab/ci/wix4.ps120
2 files changed, 21 insertions, 0 deletions
diff --git a/.gitlab/.gitignore b/.gitlab/.gitignore
index fd9cf8b..552c02c 100644
--- a/.gitlab/.gitignore
+++ b/.gitlab/.gitignore
@@ -22,5 +22,6 @@
/unstable-jom*
/watcom
/wix3
+/wix4
/clang-tidy-fixes
/num_warnings.txt
diff --git a/.gitlab/ci/wix4.ps1 b/.gitlab/ci/wix4.ps1
new file mode 100755
index 0000000..6209f2b
--- /dev/null
+++ b/.gitlab/ci/wix4.ps1
@@ -0,0 +1,20 @@
+$erroractionpreference = "stop"
+
+$version = "4.0.4"
+$sha256sum = "FB6E94C89B12FB65D3AA0CF9E9C630DAFCC7D57F1E66C7D6035CAD37A38CC284"
+$filename = "wix-$version-win-any-1"
+$tarball = "$filename.zip"
+
+$outdir = $pwd.Path
+$outdir = "$outdir\.gitlab"
+$ProgressPreference = 'SilentlyContinue'
+Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/$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\wix4"
+Remove-Item "$outdir\$tarball"