Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make kompose go get-able #227

Merged
merged 2 commits into from
Oct 30, 2016
Merged

make kompose go get-able #227

merged 2 commits into from
Oct 30, 2016

Conversation

ngtuna
Copy link
Contributor

@ngtuna ngtuna commented Oct 20, 2016

Fix #216

@ericchiang
Copy link

I was implying the CLI be go-getable in #216

@ngtuna
Copy link
Contributor Author

ngtuna commented Oct 20, 2016

@ericchiang you mean go get github.com/kubernetes-incubator/kompose/cli ?

@ericchiang
Copy link

@ngtuna I was implying renaming the package main to kompose so go get would install the binary correctly. For users familiar with Go this is what they expect for most CLI go projects.

So at minimum

go get github.com/kubernetes-incubator/kompose/cli/kompose

@ericchiang
Copy link

It's obviously not critical. But it's pretty standard for Go projects :)

@ngtuna
Copy link
Contributor Author

ngtuna commented Oct 20, 2016

Okay thanks @ericchiang for pointing it out. It's pretty easy to rename the package. I will consider more on removing experimental tag of bundlefile.

@ngtuna ngtuna force-pushed the go-getable branch 2 times, most recently from f5c2303 to ba8934a Compare October 27, 2016 22:24
@ngtuna
Copy link
Contributor Author

ngtuna commented Oct 27, 2016

@ericchiang I see it would be better to move main/main.go to the parent directory but not sure if it violates the standard of kubenertes-incubator or not. That is a bit of weird in path of the package when doing go get github.com/kubernetes-incubator/kompose/cli/kompose. It would be better with:

$ go get github.com/kubernetes-incubator/kompose

@ericchiang
Copy link

$ go get github.com/kubernetes-incubator/kompose

I'm for this (but that's just a preference).

@dustymabe
Copy link
Contributor

Works for me but I can't officially review so it's not worth much.

@ngtuna
Copy link
Contributor Author

ngtuna commented Oct 28, 2016

ping @ericchiang @kadel Could you add your review on this ?

@ericchiang
Copy link

lgtm but I'll let @kadel add the review.

@@ -40,6 +40,12 @@ tar -xvf kompose_linux-amd64.tar.gz --strip 1
sudo mv kompose /usr/local/bin
```

Otherwise, you could take the latest development package from master branch. Make sure your PATH includes the $GOPATH/bin directory so your commands can be easily used:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Otherwise/Alternatively/g

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Committed amend

@janetkuo
Copy link
Member

I found that make binary doesn't work on HEAD (not broken by this PR)

$ make binary
CGO_ENABLED=1 ./script/make.sh binary
---> Making bundle: binary (in .)
# command-line-arguments
./main.go:35: cannot use command.BeforeApp (type func(*"github.com/kubernetes-incubator/kompose/vendor/github.com/urfave/cli".Context) error) as type func(*"github.com/skippbox/kompose/vendor/github.com/urfave/cli".Context) error in assignment
./main.go:36: cannot use append(command.CommonFlags()) (type []"github.com/kubernetes-incubator/kompose/vendor/github.com/urfave/cli".Flag) as type []"github.com/skippbox/kompose/vendor/github.com/urfave/cli".Flag in assignment
./main.go:40: cannot use command.ConvertCommandDummy() (type "github.com/kubernetes-incubator/kompose/vendor/github.com/urfave/cli".Command) as type "github.com/skippbox/kompose/vendor/github.com/urfave/cli".Command in array or slice literal
./main.go:44: cannot use command.UpCommand() (type "github.com/kubernetes-incubator/kompose/vendor/github.com/urfave/cli".Command) as type "github.com/skippbox/kompose/vendor/github.com/urfave/cli".Command in array or slice literal
./main.go:45: cannot use command.DownCommand() (type "github.com/kubernetes-incubator/kompose/vendor/github.com/urfave/cli".Command) as type "github.com/skippbox/kompose/vendor/github.com/urfave/cli".Command in array or slice literal
make: *** [binary] Error 2

@ngtuna
Copy link
Contributor Author

ngtuna commented Oct 28, 2016

I found that make binary doesn't work on HEAD (not broken by this PR)

Could you re-run it ? I just run make binary successfully on HEAD.

@janetkuo
Copy link
Member

I found that make binary doesn't work on HEAD (not broken by this PR)

Could you re-run it ? I just run make binary successfully on HEAD.

From the error log it seems that it's because I'm still using skippbox/kompose/

./main.go:35: cannot use command.BeforeApp (type func(*"github.com/kubernetes-incubator/kompose/vendor/github.com/urfave/cli".Context) error) as type func(*"github.com/skippbox/kompose/vendor/github.com/urfave/cli".Context) error in assignment

make binary works after I change my local directory from skippbox/kompose to kubernetes-incubator/kompose.

Copy link
Member

@kadel kadel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kadel kadel added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 30, 2016
@ngtuna
Copy link
Contributor Author

ngtuna commented Oct 30, 2016

Merging

@ngtuna ngtuna merged commit e909f9f into kubernetes:master Oct 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. review needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants