|
1 | 1 | [CmdletBinding()] |
2 | 2 | Param( |
3 | 3 | [Parameter(Mandatory=$true)] |
4 | | - [ValidateSet("windows-2019", "ubuntu-22.04", "macos-13")] |
| 4 | + [ValidateSet("windows-2022", "ubuntu-22.04", "macos-13", "macos-14")] |
5 | 5 | [string]$Runner, |
6 | 6 |
|
| 7 | + [Parameter(Mandatory=$true)] |
| 8 | + [ValidateSet("amd64", "x64", "arm64")] |
| 9 | + [string]$Arch, |
| 10 | + |
7 | 11 | [Parameter(Mandatory=$true)] |
8 | 12 | [string]$Version |
9 | 13 | ) |
@@ -49,31 +53,32 @@ switch($Runner) |
49 | 53 | cargo install cargo-deb |
50 | 54 | cargo deb --manifest-path=cli/Cargo.toml --output=output |
51 | 55 | $artifactName = ls output |
52 | | - $finalName = "EventStoreDB.Cloud.CLI-$Version-1.${Runner}_amd64.deb" |
| 56 | + $finalName = "EventStoreDB.Cloud.CLI-$Version-1.${Runner}_${Arch}.deb" |
53 | 57 | Push-Location "output" |
54 | 58 | Move-Item -Path $artifactName $finalName |
55 | 59 | Write-Output "artifact_name" $finalName |
56 | 60 | Write-Output "content_type" "application/vnd.debian.binary-package" |
57 | 61 | Pop-Location |
58 | 62 | } |
59 | 63 |
|
60 | | - windows-2019 |
| 64 | + windows-2022 |
61 | 65 | { |
62 | 66 | cargo build --bin esc --release |
63 | 67 | Move-Item -Path (Join-Path "target" (Join-Path "release" "esc.exe")) (Join-Path "output" "esc.exe") |
64 | 68 | Push-Location output |
65 | | - $artifactName = "EventStoreDB.Cloud.CLI-Windows-x64-$Version.zip" |
| 69 | + $artifactName = "EventStoreDB.Cloud.CLI-Windows-$Arch-$Version.zip" |
66 | 70 | Write-Output "artifact_name" $artifactName |
67 | 71 | Write-Output "content_type" "application/zip" |
68 | 72 | Compress-Archive -Path "esc.exe" -DestinationPath $artifactName |
69 | 73 | Pop-Location |
70 | 74 | } |
71 | 75 |
|
72 | | - macos-13 |
| 76 | + { $_ -in @("macos-13", "macos-14") } |
73 | 77 | { |
74 | 78 | cargo build --bin esc --release |
75 | 79 |
|
76 | | - $packageName = "EventStoreDB.Cloud.CLI-OSX-$Version.pkg" |
| 80 | + $archSuffix = if ($Arch -eq "arm64") { "-arm64" } else { "" } |
| 81 | + $packageName = "EventStoreDB.Cloud.CLI-OSX$archSuffix-$Version.pkg" |
77 | 82 | $semVer = Get-Sem-Version $Version |
78 | 83 |
|
79 | 84 | New-Item -Path . -Name "macbuild" -ItemType "directory" |
|
0 commit comments