Skip to content

Commit

Permalink
Merge pull request #184 from pwittrock/updates
Browse files Browse the repository at this point in the history
Minor improvements to commands
  • Loading branch information
Phillip Wittrock committed Oct 18, 2017
2 parents cb9c866 + f972d17 commit c7a7c5d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions cmd/apiserver-boot/boot/build/build_executables.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ func BazelBuild(cmd *cobra.Command, args []string) {
log.Fatal(err)
}

os.RemoveAll(filepath.Join("bin", "apiserver"))
os.RemoveAll(filepath.Join("bin", "controller-manager"))

c = exec.Command("cp",
filepath.Join("bazel-bin", "cmd", "apiserver", "apiserver"),
filepath.Join("bin", "apiserver"))
Expand Down Expand Up @@ -137,6 +140,9 @@ func GoBuild(cmd *cobra.Command, args []string) {
RunGenerate(cmd, args)
}

os.RemoveAll(filepath.Join("bin", "apiserver"))
os.RemoveAll(filepath.Join("bin", "controller-manager"))

// Build the apiserver
path := filepath.Join("cmd", "apiserver", "main.go")
c := exec.Command("go", "build", "-o", filepath.Join(outputdir, "apiserver"), path)
Expand Down
2 changes: 2 additions & 0 deletions cmd/apiserver-boot/boot/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ func AddCreate(cmd *cobra.Command) {
cmd.AddCommand(createCmd)
cmd.Flags().StringVar(&copyright, "copyright", "boilerplate.go.txt", "Location of copyright boilerplate file.")
AddCreateGroup(createCmd)
AddCreateResource(createCmd)
AddCreateSubresource(createCmd)
AddCreateVersion(createCmd)
}

func RunCreate(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/apiserver-boot/boot/create/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func AddCreateGroup(cmd *cobra.Command) {
createGroupCmd.Flags().StringVar(&groupName, "group", "", "name of the API group to create")

cmd.AddCommand(createGroupCmd)
AddCreateVersion(createGroupCmd)
createGroupCmd.AddCommand(createVersionCmd)
}

func RunCreateGroup(cmd *cobra.Command, args []string) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/apiserver-boot/boot/create/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ var createVersionCmd = &cobra.Command{
func AddCreateVersion(cmd *cobra.Command) {
createVersionCmd.Flags().StringVar(&groupName, "group", "", "name of the API group to create")
createVersionCmd.Flags().StringVar(&versionName, "version", "", "name of the API version to create")
cmd.AddCommand(createVersionCmd)

AddCreateResource(createVersionCmd)
cmd.AddCommand(createVersionCmd)
createVersionCmd.AddCommand(createResourceCmd)
}

func RunCreateVersion(cmd *cobra.Command, args []string) {
Expand Down

0 comments on commit c7a7c5d

Please sign in to comment.