build: ship VKS-only public binary (exclude vServer via build tag)#39
Merged
Conversation
vServer is still in development, so keep it out of the public release while letting the team keep building it on main: - Move the vServer blank-imports into register_vserver.go behind //go:build !vks_only. Default (dev/CI) builds still include and test vServer; the release build passes -tags vks_only so the shipped binary has VKS only (`grn vserver` is not present). - Soft-hide the vServer docs: drop the "vServer Commands" nav block from mkdocs.yml (the pages stay for dev reference). - Fix a stale nav entry: set-auto-upgrade-config -> config-auto-upgrade. Verified: default build has vks+vserver; `-tags vks_only` build has vks only (vserver -> unknown command); full test suite + vet pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The public release needs to ship VKS only — vServer is still under development and shouldn't be exposed to users — but
grnis a single binary that mounts every product, and the team must keep developing vServer onmain.Solution
A build tag separates "what ships" from "what's on main":
go/cmd/register_vserver.gobehind//go:build !vks_only. Default builds (dev + CI) still compile and test vServer; the release build (release.yml) now passes-tags vks_only, so the published binary contains VKS only —grn vserverreturns "unknown command".mkdocs.yml. Thedocs/commands/vserver/pages stay for dev reference (not shown in the published nav; note: still reachable by direct URL under non-strict build — say the word for a hard exclude).set-auto-upgrade-config→config-auto-upgrade(renamed back in v1.4.0), which was warning on docs build.Verified
grn --helpshowsvks+vserver.-tags vks_onlybuild: showsvksonly;grn vserver→ unknown command.go vet+ fullgo test ./...pass (vServer still tested in the default build).Ordering / re-enabling
-tags vks_onlyfromrelease.yml, delete the build tag fromregister_vserver.go(fold back intoregister.go), and restore the vServer nav block.