Skip to content

Commit

Permalink
Add installer validate command skeleton (#13)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Oct 23, 2024
1 parent 8121902 commit cae3894
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
32 changes: 32 additions & 0 deletions pkg/cmds/installer/installer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the AppsCode Community License 1.0.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package installer

import (
"github.com/spf13/cobra"
)

func NewCmdInstaller() *cobra.Command {
cmd := &cobra.Command{
Use: "installer",
Short: "Ace Installer Commands",
DisableAutoGenTag: true,
}
cmd.AddCommand(newCmdValidate())

return cmd
}
33 changes: 33 additions & 0 deletions pkg/cmds/installer/validate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the AppsCode Community License 1.0.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package installer

import (
"github.com/spf13/cobra"
)

func newCmdValidate() *cobra.Command {
cmd := &cobra.Command{
Use: "validate",
Short: "Validate installer options",
DisableAutoGenTag: true,
RunE: func(cmd *cobra.Command, args []string) error {
return nil
},
}
return cmd
}
3 changes: 3 additions & 0 deletions pkg/cmds/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"go.bytebuilders.dev/ace/pkg/cmds/cloud_swap"
"go.bytebuilders.dev/ace/pkg/cmds/cluster"
cmdconfig "go.bytebuilders.dev/ace/pkg/cmds/config"
"go.bytebuilders.dev/ace/pkg/cmds/installer"
"go.bytebuilders.dev/ace/pkg/config"
ace "go.bytebuilders.dev/client"

Expand Down Expand Up @@ -52,6 +53,8 @@ func NewRootCmd() *cobra.Command {

rootCmd.AddCommand(cloud_swap.NewCmdCloudSwap())

rootCmd.AddCommand(installer.NewCmdInstaller())

rootCmd.AddCommand(v.NewCmdVersion())
rootCmd.AddCommand(NewCmdCompletion())

Expand Down

0 comments on commit cae3894

Please sign in to comment.