bitwarden-android/.github/scripts/ios/build.ps1

30 lines
1 KiB
PowerShell
Raw Normal View History

2020-06-09 17:47:09 +03:00
param (
[Parameter(Mandatory=$true)]
[string] $configuration,
2020-06-10 16:03:12 +03:00
[string] $platform = "iPhone",
[switch] $archive
2020-06-09 17:47:09 +03:00
)
$rootPath = $env:GITHUB_WORKSPACE;
2020-06-09 18:48:11 +03:00
$iosPath = $($rootPath + "/src/iOS/iOS.csproj");
2020-06-09 17:47:09 +03:00
2020-06-10 16:03:12 +03:00
if ($archive)
{
Write-Output "########################################"
Write-Output "##### Archive $configuration Configuration for $platform Platform"
Write-Output "########################################"
msbuild "$($iosPath)" "/p:Platform=$platform" "/p:Configuration=$configuration" `
"/p:ArchiveOnBuild=true" "/t:`"Build`""
2020-06-10 16:24:27 +03:00
Write-Output "########################################"
Write-Output "##### Done"
Write-Output "########################################"
ls ~/Library/Developer/Xcode/Archives
2020-06-10 16:03:12 +03:00
} else
{
Write-Output "########################################"
Write-Output "##### Build $configuration Configuration for $platform Platform"
Write-Output "########################################"
msbuild "$($iosPath)" "/p:Platform=$platform" "/p:Configuration=$configuration" "/t:`"Build`""
}