feat: add netssh version and --version

`netssh --version` used to be passed to ssh and failed with
"unknown option -- -". Release builds now embed the tag via
-X main.version; other builds fall back to the module build info.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-10-28 11:23:19 +01:00
1 parent 2b46c4f74d
commit 786768ec53
3 files changed
+40 -2

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
out="dist/netssh_${GOOS}_${GOARCH}"
echo "→ $out"
CGO_ENABLED=0 GOOS=$GOOS GOARCH=$GOARCH \
go build -trimpath -ldflags="-s -w" \
go build -trimpath -ldflags="-s -w -X main.version=${GITHUB_REF_NAME}" \
-o "$out" ./cmd/netssh
done