Web Variante in Go V0.1
This commit is contained in:
1 parent
f9e3e94629
commit
692b9b6ef8
60 files changed
+13140
No files matched your search
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build a static Linux/arm64 binary for LektorenPlan.
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/build-linux-arm64.sh [output]
|
||||
#
|
||||
# The build is CGO-free, so the result runs on any Linux arm64 distribution
|
||||
# with a reasonably recent kernel (no SQLite or libc runtime needed).
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
output="${1:-dist/lektorenplan-linux-arm64}"
|
||||
version="${LP_VERSION:-$(git describe --tags --always --dirty 2>/dev/null || echo 1.0.0)}"
|
||||
|
||||
mkdir -p "$(dirname "$output")"
|
||||
|
||||
echo "Baue $output (Version $version) …"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
|
||||
go build -trimpath -buildvcs=false \
|
||||
-ldflags "-s -w -X main.version=$version" \
|
||||
-o "$output" .
|
||||
|
||||
echo "Fertig: $output"
|
||||
file "$output" 2>/dev/null || true
|
||||
Reference in new issue
Block a user