mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-05 12:24:08 +01:00
* Absturzschutz: Fehler in Hintergrundarbeit beenden sshTermy nicht mehr; Zeitgrenzen für Update-Download und Team-Abo; Gast-Tasten über Warteschlange Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * CI: Zeitgrenzen je Job, alte Läufe abbrechen, Tests in zufälliger Reihenfolge; make check; Bibliotheken aktualisiert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * update: Stillstand auch ohne Lesefehler erkennen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Zufallstests für Teilen, Vermittler, MCP, Syslog, KI-Antworten, Sync und Fenster-Rahmen; Syslog-Empfang übersteht kaputte Pakete; MCP antwortet auch nach Fehler Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Tests: Tresor (Passwortwechsel, Sperre, Blobs, KDF-Grenzen), SFTP-Rundreise, serielle Konsole mit Ersatzkabel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Dauerlauf-Test (make soak) und nächtlicher Lauf mit langen Zufallstests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Fuzz: Zeitlimit je Eingabe auch für die neuen Tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Selbstprüfung: sshtermy doctor und Palette › Hilfe › Fehlersuche; versehentlich eingecheckte Programmdatei entfernt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Oberfläche aufteilen, erster Schritt: Mausbereiche (ui/clickzone) und abgelegte Dateien (ui/dropped) als eigene Pakete Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj * Doku: Absturzschutz und Selbstprüfung in README, Webseite und Handbuch; Plan zur Aufteilung von internal/ui; Zusehen-WASM neu gebaut Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUkBzZ657Au6Rz4BPXj --------- Co-authored-by: Claude <noreply@anthropic.com>
89 lines
3.6 KiB
Makefile
89 lines
3.6 KiB
Makefile
# sshTermy Build. Version = MAJOR.MINOR aus VERSION + Anzahl Commits.
|
|
VERSION := $(shell cat VERSION).$(shell git rev-list --count HEAD 2>/dev/null || echo 0)
|
|
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo none)
|
|
DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
PKG := github.com/db9979/sshtermy/internal/version
|
|
LDFLAGS := -s -w -X $(PKG).Version=$(VERSION) -X $(PKG).Commit=$(COMMIT) -X $(PKG).Date=$(DATE) -X $(PKG).UpdatePubKey=$(UPDATE_PUBKEY)
|
|
TARGETS := windows/arm64 windows/386 windows/amd64 darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 linux/arm linux/riscv64
|
|
|
|
.PHONY: build test check soak bench loadtest dist clean run golden handout fuzz vuln icon zusehen
|
|
build:
|
|
CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" -o bin/sshtermy ./cmd/sshtermy
|
|
|
|
test:
|
|
go vet ./... && go test ./...
|
|
cd third_party/vt && go test ./...
|
|
cd third_party/ansi && go test ./...
|
|
|
|
# Vor dem Push: dasselbe wie die CI-Jobs test + lint (Format, vet, staticcheck,
|
|
# Tests in zufälliger Reihenfolge). Spart den Umweg über einen roten CI-Lauf.
|
|
check:
|
|
tools/check-fmt.sh
|
|
go vet ./...
|
|
# staticcheck mit dem Go dieses Projekts bauen (sonst versteht es neuere Sprachstände nicht)
|
|
GOTOOLCHAIN=$$(go env GOVERSION) go run honnef.co/go/tools/cmd/staticcheck@v0.8.2 ./...
|
|
go test -shuffle=on ./...
|
|
cd third_party/vt && go test ./...
|
|
cd third_party/ansi && go test ./...
|
|
|
|
# Leistung: Terminal-Durchsatz, Speicher pro Tab, Manager mit 500 Verbindungen
|
|
bench:
|
|
go test -run '^$$' -bench . -benchtime 2s ./internal/termemu ./internal/ui ./internal/store
|
|
|
|
# Lasttest mit 1000 Hosts (Manager, Palette, Online-Prüfung, Broadcast, Sync, MCP)
|
|
loadtest:
|
|
SSHTERMY_LOAD=1 go test -run TestLoad1000 -v -count=1 ./internal/ui
|
|
|
|
# Dauerlauf: Tabs öffnen/schließen, Verbindungen abreißen, Lecks messen (nachts in CI)
|
|
SOAK ?= 10m
|
|
soak:
|
|
SSHTERMY_SOAK=$(SOAK) go test -run TestSoak -v -count=1 -timeout 0 ./internal/ui
|
|
|
|
# Fuzz-Tests (Parser für Daten von fremden Geräten), je FUZZTIME lang
|
|
FUZZTIME ?= 20s
|
|
fuzz:
|
|
FUZZTIME=$(FUZZTIME) tools/fuzz/run.sh
|
|
|
|
# Bekannte Sicherheitslücken in Go und den Bibliotheken
|
|
vuln:
|
|
go run golang.org/x/vuln/cmd/govulncheck@latest ./...
|
|
|
|
# Bildschirm-Tests (internal/ui/testdata/golden) nach gewollten Änderungen neu schreiben
|
|
golden:
|
|
go test ./internal/ui -run TestGolden -update
|
|
|
|
# Kurzreferenz zum Ausdrucken (site/handout/*.pdf) + Fingerabdruck der Tasten, braucht Node + Playwright
|
|
handout:
|
|
node tools/handout/render.mjs
|
|
HANDOUT_STAMP=1 go test ./internal/ui -run TestHandoutKeysCurrent -count=1
|
|
|
|
# Zusehen im Browser: WebAssembly aus cmd/zusehen-wasm (+ passendes wasm_exec.js), eingecheckt
|
|
zusehen:
|
|
GOOS=js GOARCH=wasm CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o internal/webwatch/assets/zusehen.wasm ./cmd/zusehen-wasm
|
|
gzip -9 -n -f internal/webwatch/assets/zusehen.wasm
|
|
chmod 644 internal/webwatch/assets/zusehen.wasm.gz
|
|
install -m 644 "$$(go env GOROOT)/lib/wasm/wasm_exec.js" internal/webwatch/assets/wasm_exec.js
|
|
ZUSEHEN_STAMP=1 go test ./internal/webwatch -run TestWasmCurrent -count=1
|
|
|
|
# App-Icon neu erzeugen (assets/icon, site/*.png, Windows-.syso), braucht Python+Pillow und Node+Playwright
|
|
icon:
|
|
python3 tools/icon/gen.py
|
|
node tools/icon/render.mjs
|
|
python3 tools/icon/pack.py
|
|
go run ./tools/icon/winres
|
|
|
|
dist: test
|
|
@mkdir -p dist
|
|
@for t in $(TARGETS); do \
|
|
os=$${t%/*}; arch=$${t#*/}; ext=""; [ $$os = windows ] && ext=".exe"; \
|
|
echo "-> $$os/$$arch"; \
|
|
CGO_ENABLED=0 GOARM=7 GOOS=$$os GOARCH=$$arch go build -trimpath -ldflags "$(LDFLAGS)" -o dist/sshtermy_$${os}_$${arch}$$ext ./cmd/sshtermy || exit 1; \
|
|
done
|
|
cd dist && sha256sum sshtermy_* > checksums.txt
|
|
|
|
run: build
|
|
./bin/sshtermy
|
|
|
|
clean:
|
|
rm -rf bin dist
|