diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 217a72b..b31ca53 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,9 @@ jobs: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} CGO_ENABLED: '0' - run: go build -o grn-${{ matrix.suffix }} . + # Public release binaries ship VKS only; vServer is excluded via the + # vks_only build tag until it is ready to release. + run: go build -tags vks_only -o grn-${{ matrix.suffix }} . - name: Upload artifact uses: actions/upload-artifact@v4 diff --git a/go/cmd/register.go b/go/cmd/register.go index 2db6db2..a373bf4 100644 --- a/go/cmd/register.go +++ b/go/cmd/register.go @@ -3,8 +3,10 @@ package cmd // Product services self-register via their package init(). Blank-importing them // here is the ONLY change needed to mount a new product CLI — root.go iterates // the registry and never needs editing. +// +// vServer is registered in register_vserver.go behind the "!vks_only" build tag, +// so the public release binary (built with `-tags vks_only`) ships VKS only while +// vServer is still under development. import ( _ "github.com/vngcloud/greennode-cli/cmd/vks" - _ "github.com/vngcloud/greennode-cli/cmd/vserver" - _ "github.com/vngcloud/greennode-cli/internal/resources/vserver" ) diff --git a/go/cmd/register_vserver.go b/go/cmd/register_vserver.go new file mode 100644 index 0000000..afc2d35 --- /dev/null +++ b/go/cmd/register_vserver.go @@ -0,0 +1,13 @@ +//go:build !vks_only + +package cmd + +// vServer command group + its resource completers. Compiled into the binary by +// default (so dev builds and CI test it), but EXCLUDED from the public release +// binary, which is built with `-tags vks_only` while vServer is still in +// development. Remove this tag (and the build flag in release.yml) once vServer +// is ready to ship. +import ( + _ "github.com/vngcloud/greennode-cli/cmd/vserver" + _ "github.com/vngcloud/greennode-cli/internal/resources/vserver" +) diff --git a/mkdocs.yml b/mkdocs.yml index 62bd281..5dc4469 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -59,7 +59,7 @@ nav: - Versions: - list-cluster-versions: commands/vks/list-cluster-versions.md - Auto-Upgrade: - - set-auto-upgrade-config: commands/vks/set-auto-upgrade-config.md + - config-auto-upgrade: commands/vks/config-auto-upgrade.md - delete-auto-upgrade-config: commands/vks/delete-auto-upgrade-config.md - Auto-Healing: - config-auto-healing: commands/vks/config-auto-healing.md @@ -72,21 +72,8 @@ nav: - get-quota: commands/vks/get-quota.md - Waiter: - wait: commands/vks/wait.md - - vServer Commands: - - Overview: commands/vserver/index.md - - Server: - - server: commands/vserver/server.md - - Networking: - - vpc: commands/vserver/vpc.md - - subnet: commands/vserver/subnet.md - - Storage: - - volume: commands/vserver/volume.md - - volume-type: commands/vserver/volume-type.md - - Security: - - secgroup: commands/vserver/secgroup.md - - Discovery: - - flavor: commands/vserver/flavor.md - - image: commands/vserver/image.md + # vServer Commands are omitted from the published nav until vServer is released. + # The pages under docs/commands/vserver/ remain for development reference. - Development: - Contributing: development/contributing.md - Architecture & Adding a Service: development/architecture.md