-
Notifications
You must be signed in to change notification settings - Fork 6
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
package uri doesnt handle branches names properly #45
Comments
I ran into this today with hyphenated branches. Should the regex be modified, or do you have another idea on how to fix it? |
Im not really sure. I think it requires a breaking change no matter what. Perhaps using a double slash to seperate the path. I could never decide so I left it. What do you think? |
I like the idea of using URL parameters. Maybe something like |
That would be ok with me. Do you want to try and do that? Idieally this would also solve the situation with the .git suffix, which is kind of strange at the moment. But it doesnt have to, I guess. https://github.com/bluebrown/kobold/blob/main/git/pkguri.go |
I did some experiments with https://github.com/hashicorp/go-getter, regarding this. It kind of looks promising but then it doesnt exaclty work out, as far as I can see. It would be nice though. |
thanks @tsmalls93, I have build the image here: docker.io/bluebrown/kobold:e6ad83e. You could deploy it for good and do some smoketests. |
@tsmalls93 , I have released your change now https://github.com/bluebrown/kobold/releases. Thanks again |
The current implementation fo the git package uri is pretty buggy. It was a bad idea to go for this custom format after all.
The root of all evil is, of course, regex:
kobold/git/pkguri.go
Line 29 in 925580b
This only works for single word branches like
main
ortrunk
. Something likemy-branch
ormy/branch
will not work.The reason why the custom parser has been created is because the url package from the stdlib doesnt understand the ssh url for git. For example https://github.com/hashicorp/go-getter/tree/main/helper/url.
Kustomize can also fetch packages from remote: https://github.com/kubernetes-sigs/kustomize/blob/82ee768212df792aec76636c07c487b40500ce46/cmd/gorepomod/internal/utils/utils.go#L53-L54
The text was updated successfully, but these errors were encountered: