Stabilize packaging and scheduler storage

This commit is contained in:
mixeme
2026-06-14 23:23:14 +03:00
parent 4c11bb4f06
commit 414be2dfe9
19 changed files with 440 additions and 84 deletions
+13
View File
@@ -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"
+13
View File
@@ -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"
+30
View File
@@ -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"