Skip to content

Commit f064891

Browse files
committed
Fix up
1 parent 2886461 commit f064891

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

make.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Param(
1313

1414
[Parameter(HelpMessage="Architecture (native, x64).")]
1515
[string]
16-
$ZipArch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture,
16+
$Arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture,
1717

1818
[Parameter(HelpMessage="Directory to install to.")]
1919
[string]
@@ -22,13 +22,13 @@ Param(
2222

2323
$ErrorActionPreference = "Stop"
2424

25-
if ($ZipArch -ieq 'x64')
25+
if ($Arch -ieq 'x64')
2626
{
27-
$ZipArch = 'x86-64'
27+
$Arch = 'x86-64'
2828
}
29-
elseif ($ZipArch -ieq 'arm64')
29+
elseif ($Arch -ieq 'arm64')
3030
{
31-
$ZipArch = 'arm64'
31+
$Arch = 'arm64'
3232
}
3333

3434
$target = "ponyup" # The name of the target executable.
@@ -104,8 +104,8 @@ function BuildTarget
104104
{
105105
if ($binaryTimestamp -lt $file.LastWriteTimeUtc)
106106
{
107-
Write-Host "corral run -- ponyc $configFlag $ponyArgs --output `"$buildDir`" --bin-name `"$target`" `"$srcDir`""
108-
$output = (corral run -- ponyc $configFlag $ponyArgs --output "$buildDir" --bin-name "$target" "$srcDir")
107+
Write-Host "corral run -- ponyc $configFlag $ponyArgs --cpu `"$Arch`" --output `"$buildDir`" --bin-name `"$target`" `"$srcDir`""
108+
$output = (corral run -- ponyc $configFlag $ponyArgs --cpu `"$Arch`"--output "$buildDir" --bin-name "$target" "$srcDir")
109109
$output | ForEach-Object { Write-Host $_ }
110110
if ($LastExitCode -ne 0) { throw "Error" }
111111
break buildFiles
@@ -216,7 +216,7 @@ switch ($Command.ToLower())
216216
if (-not $isLibrary)
217217
{
218218
$binDir = Join-Path -Path $Destdir -ChildPath "bin"
219-
$package = "$target-$ZipArch-pc-windows-msvc.zip"
219+
$package = "$target-$Arch-pc-windows-msvc.zip"
220220
Write-Host "Creating $package..."
221221

222222
Compress-Archive -Path $binDir -DestinationPath "$buildDir\..\$package" -Force

ponyup-init.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ $ErrorActionPreference = 'Stop'
44
$Arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
55
if ($Arch -ieq 'x64')
66
{
7-
$Arch = 'x86_64'
8-
$ZipArch = 'x86-64'
7+
$Arch = 'x86-64'
8+
$PlatformStringArch = 'x86_64'
99
}
1010
elseif ($Arch -ieq 'arm64')
1111
{
1212
$Arch = 'arm64'
13-
$ZipArch = 'arm64'
13+
$PlatformStringArch = 'arm64'
1414
}
1515

1616
$tempParent = [System.IO.Path]::GetTempPath()
@@ -20,7 +20,7 @@ New-Item -ItemType Directory -Path $tempPath
2020

2121
$downloadUrl = 'https://dl.cloudsmith.io/public/ponylang/releases/raw/versions/latest'
2222

23-
$zipName = "ponyup-$ZipArch-pc-windows-msvc.zip"
23+
$zipName = "ponyup-$Arch-pc-windows-msvc.zip"
2424
$zipUrl = "$downloadUrl/$zipName"
2525
$zipPath = "$tempPath\$zipName"
2626

@@ -35,13 +35,13 @@ if (-not (Test-Path $ponyupPath)) {
3535
Write-Host "Unzipping to $ponyupPath..."
3636
Expand-Archive -Force -Path $zipPath -DestinationPath $ponyupPath
3737

38-
$platform = "$Arch-pc-windows-msvc"
38+
$platform = "$PlatformStringArch-pc-windows-msvc"
3939
Write-Host "Setting platform to $platform..."
4040
Set-Content -Path "$ponyupPath\.platform" -Value $platform
4141

4242
$version = & "$ponyupPath\bin\ponyup" version
4343
if ($version -match 'ponyup (\d+\.\d+\.\d+)') {
44-
$lockStr = "ponyup-release-$($Matches[1])-$Arch-windows"
44+
$lockStr = "ponyup-release-$($Matches[1])-$PlatformStringArch-windows"
4545
Write-Host "Locking ponyup version to $lockStr..."
4646
$lockPath = "$ponyupPath\.lock"
4747

0 commit comments

Comments
 (0)