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

[Feature]Adding support for GitHub releases. #23

Open
ghost opened this issue Jul 11, 2014 · 12 comments
Open

[Feature]Adding support for GitHub releases. #23

ghost opened this issue Jul 11, 2014 · 12 comments

Comments

@ghost
Copy link

ghost commented Jul 11, 2014

You easily can get GitHub releases info in JSON format using API link(like this).
If mod uses proper versioning(like v1.7.10-1.0.0), then you can get the tag with latest version for 1.7.2 and compare it with current version of a mod. And you can fetch the body of a release and use it as a changelog.
Also you can use the link to releases page as a download page one(if it wasn't set explicitly by a mod author).

@WORMSS
Copy link

WORMSS commented Jul 11, 2014

As much as I love the idea of using the github API. I think the author having to explicitly say "use these binaries" with use of the upload file may be safer. Author having more control over it.. But that said, nothing said a user HAS to use the github API way of doing the version control. But I guess this means the mod would HAVE to me open source, since if the repo is private you could not use the releases API.

@ghost
Copy link
Author

ghost commented Jul 11, 2014

It should be optional what to use. For example, IMC message with another key for GitHub stuff.

@Dynious
Copy link
Owner

Dynious commented Jul 11, 2014

I like this idea, but I think this won't be used that often. I rarely see modders use GitHubs release system. I'd much rather have integration with CurseForge. @Kaelten said they are looking at adding some kind of API for modders, but no ETA ;)

@squeek502
Copy link
Contributor

Funnily enough, I wrote a PHP script today to generate a version.json from a Github release using the Github API in preparation for adding Version Checker support to my mods.

Script: https://gist.github.com/squeek502/85ebca7c10f0ccf7bd6f

@WORMSS
Copy link

WORMSS commented Jul 11, 2014

@anti344 as a Side note, you can still use the Github as a binary host, you could have a branch on github that holds nothing but a simple txt file. The normal "version_control.txt" you need upload to somewhere anyway. And then have it point to a github release url. I know it's not exactly what you wanted, but it is atleast something?

versioncontrol link

https:// raw.githubusercontent.com/{user}/{repo}/{releasebranch}/version_control.txt

direct link to file within version_control.txt

https:// github.com/{user}/{repo}/releases/download/{versionTag}/{mod.jar/mod.zip}

Here I have said {releasebranch} as I have kept the version_control.txt file off the master/development branch, and just have a completely different branch that does nothing but hold the file for reference.

@squeek502
Copy link
Contributor

@WORMSS, that's what @Dynious does currently for his mods (version.json in the master branch). See: https://github.com/Dynious/VersionChecker/blob/master/version.json

@WORMSS
Copy link

WORMSS commented Jul 11, 2014

@squeek502 looks to me @Dynious uses curseforge, not github releases.

@squeek502
Copy link
Contributor

@WORMSS, he hosts the .json file (which you called version_control.txt above) on Github, exactly as you suggested. Where the binaries are hosted is irrelevant if there is a static/manually updated .json file pointing to them.

@Dynious
Copy link
Owner

Dynious commented Jul 11, 2014

Don't get me wrong, if this is PR'ed I'll merge it, but just don't have the time to do this :(

@WORMSS
Copy link

WORMSS commented Jul 11, 2014

@squeek502 I was referring to the whole of the original question/issue. Not just the first part of it.

@WORMSS
Copy link

WORMSS commented Jul 11, 2014

@Dynious I have quite a lightweight github api library I can prob rip apart and tighten up to accommodate the issue.. I'l give it a look over on Sunday night, see what I can do. I think it currently works with AsyncTask as long as that will not be a problem in the MC environment.

@ghost
Copy link
Author

ghost commented Jul 11, 2014

Why you need github api library if everything is in JSON an easily avaible?

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