mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
30 lines
634 B
Go
30 lines
634 B
Go
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
|
|
// Licensed under the GNU Affero General Public License (AGPL).
|
|
// See License-AGPL.txt in the project root for license information.
|
|
|
|
package cmd
|
|
|
|
import (
|
|
_ "embed"
|
|
"fmt"
|
|
|
|
gitpod "github.com/gitpod-io/gitpod/gitpod-cli/pkg/gitpod"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// urlCmd represents the url command
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Hidden: false,
|
|
Short: "Prints the version of the CLI",
|
|
Args: cobra.MaximumNArgs(1),
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println(gitpod.Version)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|