We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 945bfcc commit 5f28607Copy full SHA for 5f28607
.github/workflows/ci.yml
@@ -45,4 +45,4 @@ jobs:
45
- name: Build CLI binary
46
run: go build -o rd-test ./rd/main.go
47
- name: Verify CLI binary
48
- run: ./rd-test
+ run: ./rd-test version
rd/cmd/version.go
@@ -0,0 +1,22 @@
1
+package cmd
2
+
3
+import (
4
+ "fmt"
5
6
+ "github.com/spf13/cobra"
7
+)
8
9
+const VERSION = "v0.1.1"
10
11
+var versionCmd = &cobra.Command{
12
+ Use: "version",
13
+ Short: "Show version information",
14
+ Long: `Show version information of RealDebrid CLI tool.`,
15
+ Run: func(cmd *cobra.Command, args []string) {
16
+ fmt.Printf("%s\n", VERSION)
17
+ },
18
+}
19
20
+func init() {
21
+ rootCmd.AddCommand(versionCmd)
22
0 commit comments