Stabilize packaging and scheduler storage
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
param(
|
||||
[string]$Output = "dist\linux\pysentry"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
docker build -f Dockerfile.linux -t pysentry-linux-builder .
|
||||
$containerId = docker create pysentry-linux-builder
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path $Output) | Out-Null
|
||||
docker cp "${containerId}:/out/pysentry" $Output
|
||||
docker rm $containerId | Out-Null
|
||||
|
||||
Write-Host "Built $Output"
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
output="${1:-dist/linux/pysentry}"
|
||||
mkdir -p "$(dirname "$output")"
|
||||
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=linux
|
||||
export GOARCH=amd64
|
||||
|
||||
go build -trimpath -ldflags "-s -w" -o "$output" ./cmd/pysentry
|
||||
|
||||
echo "Built $output"
|
||||
@@ -0,0 +1,30 @@
|
||||
param(
|
||||
[string]$Output = "dist\windows\pysentry.exe"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$go = "${env:ProgramFiles}\Go\bin\go.exe"
|
||||
if (-not (Test-Path $go)) {
|
||||
$go = "go"
|
||||
}
|
||||
|
||||
$msys2Bin = "C:\msys64\ucrt64\bin"
|
||||
if (Test-Path $msys2Bin) {
|
||||
$env:Path = "$msys2Bin;$env:Path"
|
||||
}
|
||||
|
||||
$env:CGO_ENABLED = "1"
|
||||
$env:GOOS = "windows"
|
||||
$env:GOARCH = "amd64"
|
||||
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path $Output) | Out-Null
|
||||
|
||||
$windres = Get-Command windres.exe -ErrorAction SilentlyContinue
|
||||
if ($windres) {
|
||||
& $windres.Source -O coff -o .\cmd\pysentry\rsrc_windows_amd64.syso .\packaging\windows\pysentry.rc
|
||||
}
|
||||
|
||||
& $go build -trimpath -ldflags "-s -w" -o $Output .\cmd\pysentry
|
||||
|
||||
Write-Host "Built $Output"
|
||||
Reference in New Issue
Block a user