@echo off
setlocal
cd /d "%~dp0"

mkdir "dist\navis-release\darwin-arm64" 2>nul
mkdir "dist\navis-release\darwin-amd64" 2>nul

set CGO_ENABLED=0
set GOOS=darwin
set GOARCH=arm64
go build -ldflags="-s -w" -o "dist\navis-release\darwin-arm64\Navis" .\cmd\vpnclient
if errorlevel 1 exit /b 1

set GOARCH=amd64
go build -ldflags="-s -w" -o "dist\navis-release\darwin-amd64\Navis" .\cmd\vpnclient
if errorlevel 1 exit /b 1

echo Built:
dir /b "dist\navis-release\darwin-arm64\Navis"
dir /b "dist\navis-release\darwin-amd64\Navis"
endlocal
