File tree Expand file tree Collapse file tree 4 files changed +30
-6
lines changed
Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -80,3 +80,11 @@ cli-docs: ## generate cli documenation
8080check-cli-docs : cli-docs
8181 git diff --exit-code -- docs/content/reference/
8282
83+ .PHONY : prep-release
84+ prep-release :
85+ @echo " Replace $( OLD_VERSION) with $( NEW_VERSION) "
86+ sed -i " s/$$ {OLD_VERSION}/$$ {NEW_VERSION}/" internal/cmd/client_version.go docs/config.toml
87+ touch docs/content/releases/$(NEW_VERSION ) .md
88+
89+ prep-release-docs : prep-release cli-docs
90+
Original file line number Diff line number Diff line change 1+ // Copyright 2021 - 2023 Crunchy Data Solutions, Inc.
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
15+ package cmd
16+
17+ // store the current PGO CLI version
18+ const clientVersion = "v0.3.0"
Original file line number Diff line number Diff line change @@ -29,9 +29,6 @@ import (
2929 "github.com/crunchydata/postgres-operator-client/internal"
3030)
3131
32- // store the current PGO CLI version
33- const clientVersion = "v0.3.0"
34-
3532// NewPGOCommand returns the root command of the PGO plugin. This command
3633// prints the same information as its --help flag: the available subcommands
3734// and their short descriptions.
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ package cmd
1616
1717import (
1818 "context"
19+ "fmt"
1920
2021 "github.com/spf13/cobra"
2122 v1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1"
@@ -46,12 +47,12 @@ func newVersionCommand(config *internal.Config) *cobra.Command {
4647 // No arguments for 'version'
4748 cmd .Args = cobra .NoArgs
4849
49- cmd .Example = internal .FormatExample (`# Request the version of the client and the operator
50+ cmd .Example = internal .FormatExample (fmt . Sprintf ( `# Request the version of the client and the operator
5051pgo version
5152
5253### Example output
53- Client Version: v0.3.0
54- Operator Version: v5.5.0` )
54+ Client Version: %s
55+ Operator Version: v5.5.0` , clientVersion ) )
5556
5657 cmd .RunE = func (cmd * cobra.Command , args []string ) error {
5758
You can’t perform that action at this time.
0 commit comments