Closed patriksvensson closed 3 years ago
I'm interested in having a conversation about your specific thoughts on this feature.
This one would be GitHub specific (release assets and stuff unique to github).
I could have sworn that I added an issue for generic Git support, but i must have been mistaken :/
I was thinking about doing this, but it seems like something that wouldn't be appropriate in Cake.Common. Especially since it might bring in an extra dependency. Have you considered adding a Cake Contrib repository for additional tools that have above average depedencies?
I imagine this would use Octokit.net, yes?
@ChrisMissal For creating and uploading releases, GitHub's REST API would suffice to avoid taking a dependency. I know that I'm a little bit reluctant to include third party dependencies in Cake, but it's a slippery slope :smile:
Here is an example of how this could be done: https://github.com/hadouken/hadouken/blob/develop/win32/build.cake#L280
My intention was to use octokit. This might be the point we consider cake contrib for functionality that takes a third party dependency, but is maintained by cake.
For sure, I was thinking it would work like https://github.com/WCOMAB/Cake.Slack for example. If Cake could just expose Octokit, then script builds could do whatever they wanted.
@RichiCoder1 @ChrisMissal Yes. I like the idea of maintaining official plugins seperate from the Cake package itself.
I'm not opposed to including third party libraries. libgit2sharp for example is probably something we need to take a dependency on later for Git support. I'm just being a little bit cautious.
@ChrisMissal I agree. Exposing OctoKit would probably be better than writing Wrappers around everything (if I understand you correctly).
This could be done with the #addin
pre-processor which would download Octokit from NuGet and add a reference to it in the project.
Would be nice though with support for creating releases and uploading artifacts out of the box.
I was just thinking...
Would it make sense to encapsulate GitReleaseManager to do this work, rather than re-invent the wheel? We have already created, using Octokit, the ability to create a release, upload assets, close milestones, publish a release, etc.
GitReleaseManager is a standalone exe, which could easily be created as an alias in Cake.
https://gitreleasemanager.readme.io/docs/create
Just a thought :smile_cat:
That could work if we want it built in :)
Regardless GitReleaseManager could be an excellent addin, Cake addins is a great way to extend the DSL, also makes it easy to test/release out of band and super easy to move into Cake later.
Since GitReleaseManager Aliases have just been pulled in, I think we can go ahead and close this issue? Thoughts?
I actually want wrappers around GitHubs API:s as well in the future so I think we could leave this open for now.
No worries, just thought I would check.
Great that you did :) On Oct 17, 2015 14:17, "Gary Ewan Park" notifications@github.com wrote:
No worries, just thought I would check.
— Reply to this email directly or view it on GitHub https://github.com/cake-build/cake/issues/73#issuecomment-148913008.
I wanted the functionality to create GitHub pull requests/issues, so have thrown together an add-in to wrap Octokit and provide that. It's not pretty yet, but hopefully will become sharable at some point!
What I'm not sure about, is what other parts of the API would be worth including. The release functionality seems to be taken care of by the GitReleaseManager add-in, and I'm not sure of the value of much else in the API, for a build script.
Did you have any particular ideas of what else you thought should be included @patriksvensson? Anyone else?
There's now a Cake.GitHub addin available using OctoKit and which can be extended with additional features if required. There exists also a Cake.OctoDeploy addin providing some addins for working with GitHub releases.
Closing this since requests for additional features should be done to the addin repos.
Would be nice to be able to be able to communicate with GitHub directly from the build script. For example to create a release and to upload release assets.
This obviously need some more thought.