Commit 443df2df by Patrick Steinhardt

azure: replace mingw setup with bash

We're about to phase out our Powershell scripts as Azure
Pipelines does in fact support Bash scripts on all platforms. As
a preparatory step, let's replace our MinGW setup script with a
Bash script.
parent d8e85d57
......@@ -91,7 +91,7 @@ jobs:
displayName: 'Windows (amd64; MinGW)'
pool: Hosted
steps:
- powershell: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.ps1'
- bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh'
displayName: Setup
env:
TEMP: $(Agent.TempDirectory)
......@@ -106,7 +106,7 @@ jobs:
displayName: 'Windows (x86; MinGW)'
pool: Hosted
steps:
- powershell: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.ps1'
- bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh'
displayName: Setup
workingDirectory: '$(Build.BinariesDirectory)'
env:
......
......@@ -94,7 +94,7 @@ jobs:
displayName: 'Windows (amd64; MinGW)'
pool: Hosted
steps:
- powershell: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.ps1'
- bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh'
displayName: Setup
env:
TEMP: $(Agent.TempDirectory)
......@@ -110,7 +110,7 @@ jobs:
displayName: 'Windows (x86; MinGW)'
pool: Hosted
steps:
- powershell: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.ps1'
- bash: . '$(Build.SourcesDirectory)\azure-pipelines\setup-mingw.sh'
displayName: Setup
workingDirectory: '$(Build.BinariesDirectory)'
env:
......
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem");
Write-Host "##############################################################################"
Write-Host "## Downloading mingw"
Write-Host "##############################################################################"
if ($env:ARCH -eq "amd64") {
$mingw_uri = "https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-x86_64-8.1.0-release-win32-seh-rt_v6-rev0.zip"
$platform = "x86_64"
} else {
$mingw_uri = "https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip"
$platform = "x86"
}
$wc = New-Object net.webclient
$wc.Downloadfile($mingw_uri, "${Env:TEMP}/mingw-${Env:ARCH}.zip")
[System.IO.Compression.ZipFile]::ExtractToDirectory("${Env:TEMP}/mingw-${Env:ARCH}.zip", $Env:TEMP)
#!/bin/sh -e
echo "##############################################################################"
echo "## Downloading mingw"
echo "##############################################################################"
case "$ARCH" in
amd64)
MINGW_URI="https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-x86_64-8.1.0-release-win32-seh-rt_v6-rev0.zip";;
x86)
MINGW_URI="https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
esac
curl -s -L "$MINGW_URI" -o "$TEMP"/mingw-"$ARCH".zip
unzip -q "$TEMP"/mingw-"$ARCH".zip -d "$TEMP"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment