Initial commit: archer, a Go-native MySQL/MariaDB table archiver
Renamed from arcdb: module path, cmd/archer, internal/archererr, docs, build scripts and ARCHER_* environment variables. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
bc4a6b504f
99 files changed
+12752
No files matched your search
@@ -0,0 +1,24 @@
|
||||
param(
|
||||
[string]$Version = "0.1.0",
|
||||
[string]$Commit = $(if ($env:ARCHER_COMMIT) { $env:ARCHER_COMMIT } else { "local" })
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$date = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
|
||||
$ldflags = "-s -w -X archer/internal/version.Version=$Version -X archer/internal/version.Commit=$Commit -X archer/internal/version.Date=$date"
|
||||
|
||||
New-Item -ItemType Directory -Force -Path (Join-Path $root "dist") | Out-Null
|
||||
Push-Location $root
|
||||
try {
|
||||
go build -trimpath -ldflags $ldflags -o dist/archer_windows_amd64.exe ./cmd/archer
|
||||
$env:GOOS = "linux"
|
||||
$env:GOARCH = "amd64"
|
||||
go build -trimpath -ldflags $ldflags -o dist/archer_linux_amd64 ./cmd/archer
|
||||
Remove-Item Env:GOOS -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:GOARCH -ErrorAction SilentlyContinue
|
||||
Write-Host "built dist/archer_windows_amd64.exe and dist/archer_linux_amd64 ($Version, $Commit)"
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
Reference in new issue
Block a user