Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Copy entitlements file into distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Jun 20, 2022
1 parent 9826a40 commit 072e47f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
$ProgressPreference = "SilentlyContinue" # progress bar in powershell is slow af
$ErrorActionPreference = "Stop"

# search for msbuild, the loaction of vswhere is guarenteed to be consistent
$MSBuildPath = (&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe) | Out-String
Set-Alias msbuild $MSBuildPath.Trim()
Set-Alias seven "$PSScriptRoot\vendor\7za.exe"

# This variable is null in github actions
if ($PSScriptRoot -eq $null) {
$PSScriptRoot = "."
} else {
Set-Location $PSScriptRoot
}

# search for msbuild, the loaction of vswhere is guarenteed to be consistent
$MSBuildPath = (&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe) | Out-String
Set-Alias msbuild $MSBuildPath.Trim()
Set-Alias seven "$PSScriptRoot\vendor\7za.exe"

# Ensure a clean state by removing build/package folders
Write-Host "Cleaning previous build outputs (if any)" -ForegroundColor Magenta
$Folders = @("build", "packages", "test\bin", "test\obj")
Expand Down Expand Up @@ -45,6 +45,7 @@ dotnet publish -v minimal --no-build -c Release --self-contained "$PSScriptRoot\
dotnet publish -v minimal --no-build -c Release --self-contained "$PSScriptRoot\src\Update.OSX\Update.OSX.csproj" -o "$ToolsDir"

Write-Host "Copying Tools" -ForegroundColor Magenta
Copy-Item -Path "$PSScriptRoot\Squirrel.entitlements" -Destination "$ToolsDir"
New-Item -Path "squirrel" -Name "tools" -ItemType "directory"
Copy-Item -Path "$ToolsDir\*" -Destination "squirrel\tools" -Recurse
Remove-Item "squirrel\tools\*.xml"
Expand Down

0 comments on commit 072e47f

Please sign in to comment.