Skip to content

Commit 5d8079c

Browse files
committed
fix: add darwin/arm64 target to build-release.ps1
1 parent b3ffb60 commit 5d8079c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

build-release.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ $env:GOOS = "darwin"; $env:GOARCH = "amd64"
4141
go build -ldflags "-X github.com/Cod-e-Codes/marchat/shared.ClientVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.ServerVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.BuildTime='$BUILD_TIME' -X github.com/Cod-e-Codes/marchat/shared.GitCommit=$GIT_COMMIT" -o "$BUILD_DIR/marchat-client-darwin-amd64" ./client
4242
go build -ldflags "-X github.com/Cod-e-Codes/marchat/shared.ClientVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.ServerVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.BuildTime='$BUILD_TIME' -X github.com/Cod-e-Codes/marchat/shared.GitCommit=$GIT_COMMIT" -o "$BUILD_DIR/marchat-server-darwin-amd64" ./cmd/server
4343

44+
Write-Host "Building for Darwin ARM64 (Apple Silicon)..." -ForegroundColor Yellow
45+
$env:GOOS = "darwin"; $env:GOARCH = "arm64"
46+
go build -ldflags "-X github.com/Cod-e-Codes/marchat/shared.ClientVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.ServerVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.BuildTime='$BUILD_TIME' -X github.com/Cod-e-Codes/marchat/shared.GitCommit=$GIT_COMMIT" -o "$BUILD_DIR/marchat-client-darwin-arm64" ./client
47+
go build -ldflags "-X github.com/Cod-e-Codes/marchat/shared.ClientVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.ServerVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.BuildTime='$BUILD_TIME' -X github.com/Cod-e-Codes/marchat/shared.GitCommit=$GIT_COMMIT" -o "$BUILD_DIR/marchat-server-darwin-arm64" ./cmd/server
48+
4449
Write-Host "Building for Linux ARM64 (use on Termux arm64; GOOS=linux, not android)..." -ForegroundColor Yellow
4550
$env:GOOS = "linux"; $env:GOARCH = "arm64"
4651
go build -ldflags "-X github.com/Cod-e-Codes/marchat/shared.ClientVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.ServerVersion=$VERSION -X github.com/Cod-e-Codes/marchat/shared.BuildTime='$BUILD_TIME' -X github.com/Cod-e-Codes/marchat/shared.GitCommit=$GIT_COMMIT" -o "$BUILD_DIR/marchat-client-linux-arm64" ./client
@@ -58,6 +63,9 @@ Compress-Archive -Path "$BUILD_DIR/marchat-client-windows-amd64.exe", "$BUILD_DI
5863
# Darwin AMD64
5964
Compress-Archive -Path "$BUILD_DIR/marchat-client-darwin-amd64", "$BUILD_DIR/marchat-server-darwin-amd64" -DestinationPath "$RELEASE_DIR/marchat-$VERSION-darwin-amd64.zip" -Force
6065

66+
# Darwin ARM64 (Apple Silicon)
67+
Compress-Archive -Path "$BUILD_DIR/marchat-client-darwin-arm64", "$BUILD_DIR/marchat-server-darwin-arm64" -DestinationPath "$RELEASE_DIR/marchat-$VERSION-darwin-arm64.zip" -Force
68+
6169
# Linux ARM64 (Termux / aarch64 Linux)
6270
Compress-Archive -Path "$BUILD_DIR/marchat-client-linux-arm64", "$BUILD_DIR/marchat-server-linux-arm64" -DestinationPath "$RELEASE_DIR/marchat-$VERSION-linux-arm64.zip" -Force
6371

@@ -71,6 +79,7 @@ Write-Host "- marchat-$VERSION-linux-amd64.zip"
7179
Write-Host "- marchat-$VERSION-linux-arm64.zip"
7280
Write-Host "- marchat-$VERSION-windows-amd64.zip"
7381
Write-Host "- marchat-$VERSION-darwin-amd64.zip"
82+
Write-Host "- marchat-$VERSION-darwin-arm64.zip"
7483

7584
# Build and push Docker image
7685
Write-Host "Building Docker image for marchat..." -ForegroundColor Yellow

0 commit comments

Comments
 (0)