diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6ed03ce4..dab57fa4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,7 @@ steps: - task: PowerShell@2 inputs: filePath: 'dev-support/bin/publish.ps1' + arguments: '-Configuration Release -BuildDos2Unix' pwsh: true - task: CopyFiles@2 inputs: @@ -33,4 +34,4 @@ steps: feedsToUsePublish: 'internal' vstsFeedPublish: '6fdda69a-feef-492b-9027-6ca329dcade4/af8d15e0-742a-4658-a87e-06eb29c6e60e' vstsFeedPackagePublish: 'OneDotNet' - versionOption: 'patch' \ No newline at end of file + versionOption: 'patch' diff --git a/dev-support/bin/publish.ps1 b/dev-support/bin/publish.ps1 index c1d45e69..694475f1 100644 --- a/dev-support/bin/publish.ps1 +++ b/dev-support/bin/publish.ps1 @@ -1,5 +1,6 @@ param( [string] $Configuration = "Release", + [switch] $BuildDos2Unix, [switch] $SkipGriPlc, [switch] $SkipGriServer, [switch] $SkipGriWpf @@ -8,14 +9,26 @@ param( $ErrorActionPreference = "Stop" $EnlistmentRoot = [System.IO.Path]::GetDirectoryName([System.IO.Path]::GetDirectoryName($PSScriptRoot)) -$UnixToDosExec = Join-Path $EnlistmentRoot "dev-support/bin/unix2dos.exe" - $OutputRoot = (Join-Path $EnlistmentRoot "output") if ([System.IO.Directory]::Exists($OutputRoot)) { Remove-Item -Path $OutputRoot -Recurse -Force } New-Item -Path $OutputRoot -ItemType Directory +if ($BuildDos2Unix) { + $DosToUnixRoot = Join-Path $OutputRoot "dos2unix" + Copy-Item ` + (Join-Path $EnlistmentRoot "third_party/dos2unix-7.4.1") ` + -Destination $DosToUnixRoot ` + -Recurse + Push-Location $DosToUnixRoot + nmake.exe /f vc.mak + Pop-Location + $UnixToDosExec = Join-Path $DosToUnixRoot "dos2unix.exe" +} else { + $UnixToDosExec = Join-Path $EnlistmentRoot "dev-support/bin/unix2dos.exe" +} + if (-not $SkipGriServer) { dotnet.exe publish ` -c $Configuration `