Skip to content

Commit 3805a21

Browse files
committed
fix: correct build path in GitHub Actions
- Fix build command path from ./cmd/codes to ./cmd - Move main.go to correct location - Update both CI and release workflows
1 parent ceef16e commit 3805a21

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: go mod download
2525

2626
- name: Build
27-
run: go build -o codes ./cmd/codes
27+
run: go build -o codes ./cmd
2828

2929
- name: Test basic functionality
3030
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Build codes
4949
run: |
50-
go build -o codes ./cmd/codes
50+
go build -o codes ./cmd
5151
5252
- name: Test
5353
run: |

cmd/main.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
"github.com/spf13/cobra"
7+
8+
"codes/internal/commands"
9+
)
10+
11+
var rootCmd = &cobra.Command{
12+
Use: "codes",
13+
Short: "A CLI tool to manage Claude environments and versions",
14+
Long: "A Go-based CLI tool to manage Claude environments and versions with multi-configuration support",
15+
}
16+
17+
func init() {
18+
rootCmd.AddCommand(commands.InstallCmd)
19+
rootCmd.AddCommand(commands.AddCmd)
20+
rootCmd.AddCommand(commands.SelectCmd)
21+
rootCmd.AddCommand(commands.UpdateCmd)
22+
rootCmd.AddCommand(commands.VersionCmd)
23+
}
24+
25+
func main() {
26+
if err := rootCmd.Execute(); err != nil {
27+
os.Exit(1)
28+
}
29+
}

0 commit comments

Comments
 (0)