feat: initial Go project scaffold with build/test/release pipeline

- Go module: github.com/netcell-it/deklarix
- cmd/server/main.go: HTTP entry point with /health endpoint
- scripts/build.sh: cross-compile amd64 + arm64
- scripts/test.sh: go vet + race tests + build-check
- scripts/release.sh: full release flow (test → build → tag → push)
- packaging/DEBIAN: .deb control template
- design/enterprise.css: enterprise design system from enconf
- CLAUDE.md: complete build/test/release documentation
- .claude/settings.local.json: Claude Code permissions
This commit is contained in:
2026-08-26 22:16:44 +02:00
parent a04e805fe1
commit 11cf9083fa
10 changed files with 4807 additions and 0 deletions

52
scripts/build.sh Executable file
View File

@@ -0,0 +1,52 @@
#!/usr/bin/env bash
# Deklarix — Build-Skript (amd64 + arm64)
#
# Verwendung:
# ./scripts/build.sh [version] # Beide Architekturen
# ./scripts/build.sh [version] amd64 # Nur amd64
# ./scripts/build.sh [version] arm64 # Nur arm64
#
# Ausgabe: dist/deklarix_<version>_<arch>
#
# Release-Prozess:
# 1. VERSION erhöhen (Semantic Versioning: MAJOR.MINOR.PATCH)
# 2. ./scripts/build.sh <version>
# 3. ./scripts/test.sh
# 4. git tag v<version> && git push origin v<version>
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
VERSION="${1:-0.0.1}"
ARCH_FILTER="${2:-both}"
GRN='\033[0;32m'; BLD='\033[1m'; NC='\033[0m'
log() { echo -e "${GRN}[build]${NC} $*"; }
export PATH=$PATH:/usr/local/go/bin
command -v go >/dev/null || { echo "Go nicht gefunden — PATH: $PATH"; exit 1; }
mkdir -p "$REPO_DIR/dist"
log "Version: $VERSION | Go: $(go version)"
ARCHS=()
case "$ARCH_FILTER" in
amd64) ARCHS=("amd64") ;;
arm64) ARCHS=("arm64") ;;
*) ARCHS=("amd64" "arm64") ;;
esac
for ARCH in "${ARCHS[@]}"; do
OUT="$REPO_DIR/dist/deklarix_${VERSION}_${ARCH}"
log "Baue $ARCH$OUT"
GOARCH=$ARCH GOOS=linux go build \
-ldflags="-X main.Version=${VERSION} -s -w" \
-o "$OUT" \
./cmd/server/
log "$ARCH fertig: $(du -sh "$OUT" | cut -f1)"
done
log "Build abgeschlossen ✓"