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

Could we use git as a repository? #11

Closed
tbarker9 opened this issue May 2, 2013 · 19 comments
Closed

Could we use git as a repository? #11

tbarker9 opened this issue May 2, 2013 · 19 comments

Comments

@tbarker9
Copy link
Contributor

tbarker9 commented May 2, 2013

Could we use git / github directly for pulling templates? It has tags for versioning and most people who use this tool, if not all, will also use git. There is also a java library to communicate with it (although I have never used it).

If we already have a server to communicate with bintray, why not have one to register git based templates like bower? It will be a lot more work I suppose, but will definitely add to its cool factor and adoption.

@kyleboon
Copy link
Contributor

kyleboon commented May 3, 2013

I was just coming to submit a ticket for this. There are a few options. JGit is relatively painless. You would have to remove all the .git specific files but that wouldn't be too difficult. Also github can generate a zip file which could be used as the project template without much change to how the system works now.

There could be a simple switch based on the user providing a URL or just a template name.

lazybones http://github.com/templateName.zip vs lazybones templateName

@tbarker9
Copy link
Contributor Author

tbarker9 commented May 3, 2013

I like that. I assume search, versions and meta data are useful, so unless git has features I don't know about an intermediate server is still needed. Maybe the intermediate server will allow registering both bintray and github. If we go down this road, should we jettison what was done with bintray? Would anyone else actually use bintray if github was an option? I wouldn't.

@kyleboon
Copy link
Contributor

kyleboon commented May 3, 2013

I like the idea of there being an 'official' place for templates with github being an option for private or in progress templates.

@tbarker9
Copy link
Contributor Author

tbarker9 commented May 3, 2013

I am not sure why a github can't be the official source.... or maybe one of two official sources. The added step of tagging and packaging my templates seems unnecessary. I suppose one could argue that github might be considered less stable than a binary release. Someone might delete the template, get rid of a version etc. I suppose adding a package to bintray is very deliberate. Also github might be dead in 5 years while resolving packages over http will be alive and well.

I do think resolving directly from any url is a great idea. Maybe we should make a separate issue for this?

@tbarker9
Copy link
Contributor Author

tbarker9 commented Jun 7, 2013

After seeing this: http://blog.bintray.com/2013/06/05/bintray-github-synergistic-love-story/, the value of this issue goes waaaay down. Might want to update README to include this as a possible way of uploading templates instead of using some hand rolled method (gradle, maven, etc.)

@tbarker9
Copy link
Contributor Author

tbarker9 commented Jun 7, 2013

I would be fine if this was closed as Won't Fix given the comment above. Anyone feel like they really need this?

@pledbrook
Copy link
Owner

I'd like to keep it open because there will inevitably be people that would like to just push template source to GitHub and install direct from there. I'm still not sure how feasible it is, but it's worth investigating. And there are several sources of git integration from Groovy/Java that we can borrow.

@tbarker9
Copy link
Contributor Author

It appears that github has a rest api along with zip downloads for each tagged item. Maybe we could use that instead of the java git api? To keep things central so list works, maybe we can have a json / groovy config file in a separate lazybones project for people to register their project templates via pull requests?

@kyleboon
Copy link
Contributor

kyleboon commented Oct 3, 2013

The problem with github zips of the project is the zip contains a single folder containing everything, so there is no README.md or lazybones script at the root level. We could add an option or something though to work around it. Otherwise, this would be fixed by #13

@tbarker9
Copy link
Contributor Author

tbarker9 commented Oct 4, 2013

I just downloaded a project, both the master and a release and it had a README.md at the root. Is there something I am not getting?

Based on the link I posted above (http://blog.bintray.com/2013/06/05/bintray-github-synergistic-love-story/) and #13 I guess doing anything special for github might be kind of silly. I suppose you could do something special with releases, but you could just directly use the zip as well.

Hooking into git in general might still be worth the effort.

@kyleboon
Copy link
Contributor

kyleboon commented Oct 4, 2013

@tbarker9 hm, not sure what I was trying before. But I just tried this with my dropwizard project and it worked with my #13 pull request. However the post install script is broken because of the removal of AntBuilder from the classpath.

@tbarker9
Copy link
Contributor Author

tbarker9 commented Oct 4, 2013

You have to add a grape annotation for groovy-ant now. There was some controversy related to removing that, but the size of the ant dependency was quite large.

@pledbrook
Copy link
Owner

"controversy" might be a bit strong 😄 There was some debate, but ultimately I don't like AntBuilder as the go to for doing file-based work. Hence why commons-io is a standard dependency: to fill that gap of moving and copying files around.

I was originally using it for unzipping the packages, but it didn't handle file permissions so I had to find a replacement. Since it wasn't being used in core, it seemed a rather large dependency to keep around "just in case".

BTW, what were you using from AntBuilder?

@tbarker9
Copy link
Contributor Author

tbarker9 commented Oct 4, 2013

Hah, yeah.... not sure why I used "controversy".

On Fri, Oct 4, 2013 at 11:00 AM, Peter Ledbrook notifications@github.comwrote:

"controversy" might be a bit strong [image: 😄] There was some
debate, but ultimately I don't like AntBuilder as the go to for doing
file-based work. Hence why commons-io is a standard dependency: to fill
that gap of moving and copying files around.

I was originally using it for unzipping the packages, but it didn't handle
file permissions so I had to find a replacement. Since it wasn't being used
in core, it seemed a rather large dependency to keep around "just in case".

BTW, what were you using from AntBuilder?


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-25705199
.

@kyleboon
Copy link
Contributor

kyleboon commented Oct 4, 2013

when do we have the first twitter war?

@pledbrook It was used to move files. The script asked the user what package name to use and then created the proper directory structure and put the classes in those directories.

Sounds like I can just update it to use commons-io to do that.

@pledbrook
Copy link
Owner

Right. I updated the template developer's guide to mention that commons-io is available to template authors.

@kyleboon
Copy link
Contributor

I think this issue is addressed by #13 which allows using github release zip files as lazybones templates. Think we should close it @pledbrook ?

@tbarker9
Copy link
Contributor Author

I agree. Along with the template mappings I don't think development here
will be worth it.

On Thu, Oct 17, 2013 at 1:17 PM, Kyle Boon notifications@github.com wrote:

I think this issue is addressed by #13https://github.com/pledbrook/lazybones/issues/13which allows using github release zip files as lazybones templates. Think
we should close it @pledbrook https://github.com/pledbrook ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-26528862
.

@pledbrook
Copy link
Owner

One could implement a package source based on finding out what tags are in the repository, but I don't have a great desire to do that myself. And you would still be short of the information required for the list and info commands. So I'm happy to close. Someone can reopen in future if they want the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants