Skip to content

Commit

Permalink
Allow force of native build through an environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Sep 24, 2018
1 parent 9195991 commit 989ffb0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Build/CheckNative.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
$files = git diff --name-only HEAD~1 HEAD
function BuildNative() {
if ($env:native -eq "true") {
return $true
}

if ($files -contains "ImageMagick/Source/ImageMagick.commit") {
$files = git diff --name-only HEAD~1 HEAD
return $files -contains "ImageMagick/Source/ImageMagick.commit"
}

if (BuildNative) {
Write-Host "##vso[task.setvariable variable=BuildNative;isOutput=true]true"
} else {
Write-Host "Not building the native library."
}

0 comments on commit 989ffb0

Please sign in to comment.