As a mod author, I would like to publish a tag or release on github and have that automatically create a new version of my mod on the mod portal.
As a mod user, I would like to be able to use the mod browser to install a specific fork or branch of a mod without the author having done anything special to make it available on the mod portal.
Integrate mod portal and browser with github/gitlab for releases and branches
Moderator: ickputzdirwech
- BlueTemplar
- Smart Inserter

- Posts: 3260
- Joined: Fri Jun 08, 2018 2:16 pm
- Contact:
Re: Integrate mod portal and browser with github/gitlab for releases and branches
Are GitLab and GitHub "releases" even compatible with each other ?
Seems to be better to stick with the more standardized Git "tags"...
Seems to be better to stick with the more standardized Git "tags"...
BobDiggity (mod-scenario-pack)
Re: Integrate mod portal and browser with github/gitlab for releases and branches
git tags are just a way to point to a particular commit, there's no end-user files available. While I can't speak for gitlab, for github a release is simply a tag that has also had 'release' files associated with it (generally an executable installer and/or a zip with the necessary application/end user files). I expect that gitlab's releases are similar. Using tags alone has minimal value, however using the release features of at least github does have value. Setting up the mod portal to be able to pull properly named zip files from github releases on project would be cool and useful.
- BlueTemplar
- Smart Inserter

- Posts: 3260
- Joined: Fri Jun 08, 2018 2:16 pm
- Contact:
Re: Integrate mod portal and browser with github/gitlab for releases and branches
Thanks for the clarification.
For my part I'd be wary about using GitHub, now that it has been bought by Microsoft,
and in general relying on any non-standardized, centralized service - considering what happened with SourceForge...
For my part I'd be wary about using GitHub, now that it has been bought by Microsoft,
and in general relying on any non-standardized, centralized service - considering what happened with SourceForge...
BobDiggity (mod-scenario-pack)
Re: Integrate mod portal and browser with github/gitlab for releases and branches
Github allows downloading a branch or tag as a zip file, even if a release has not been cut. Not sure about gitlab.
- BlueTemplar
- Smart Inserter

- Posts: 3260
- Joined: Fri Jun 08, 2018 2:16 pm
- Contact:
Re: Integrate mod portal and browser with github/gitlab for releases and branches
Of course it can, that's a git feature !
https://git-scm.com/docs/git-archive
Bitbucket has a GUI way for it too :
https://blog.developer.atlassian.com/6- ... any-commit
Also, I don't understand the part about "using tags alone has minimal value" - how does that differ in practice from the Factorio mod portal "Downloads" tab, listing all mod versions?
(Not all mod versions are major releases... and if you deemed a git commit to be important enough to tag it, why wouldn't you release it ?)
EDIT :
----
As a reminder, (that does not really concern git in its "normal" use, and obviously not Factorio mods),
in the case that you distribute different files to developers and "end-users", remember that not making source code available violates both Free Software and Open Source guidelines :
https://www.gnu.org/philosophy/free-sw.en.html
https://opensource.org/osd
Always bundling source code, if not too heavy, with your binaries, seems like it might be a good practice : imagine if a user downloads the binaries, but later he wants to use his freedom to modify the work - if the server hosting both binaries and source code is not accessible anymore, then he won't be able to do it !
(This is also why it's generally forbidden to redistribute copyleft software on physical media without bundling the source code, or without signing a contract that obligates you to provide the source code if requested.)
https://git-scm.com/docs/git-archive
Bitbucket has a GUI way for it too :
https://blog.developer.atlassian.com/6- ... any-commit
Now that I think of it, this comment seems to make no sense when talking about Factorio mods (and scripting languages in general) where the source code is identical to the end user mod !Darinth wrote: Fri Mar 29, 2019 1:01 pm git tags are just a way to point to a particular commit, there's no end-user files available. While I can't speak for gitlab, for github a release is simply a tag that has also had 'release' files associated with it (generally an executable installer and/or a zip with the necessary application/end user files). I expect that gitlab's releases are similar. Using tags alone has minimal value, however using the release features of at least github does have value. Setting up the mod portal to be able to pull properly named zip files from github releases on project would be cool and useful.
Also, I don't understand the part about "using tags alone has minimal value" - how does that differ in practice from the Factorio mod portal "Downloads" tab, listing all mod versions?
(Not all mod versions are major releases... and if you deemed a git commit to be important enough to tag it, why wouldn't you release it ?)
EDIT :
(emphasis mine)Git Tagging wrote: Like most VCSs, Git has the ability to tag specific points in a repository’s history as being important. Typically, people use this functionality to mark release points (v1.0, v2.0 and so on).
----
As a reminder, (that does not really concern git in its "normal" use, and obviously not Factorio mods),
in the case that you distribute different files to developers and "end-users", remember that not making source code available violates both Free Software and Open Source guidelines :
https://www.gnu.org/philosophy/free-sw.en.html
https://opensource.org/osd
Always bundling source code, if not too heavy, with your binaries, seems like it might be a good practice : imagine if a user downloads the binaries, but later he wants to use his freedom to modify the work - if the server hosting both binaries and source code is not accessible anymore, then he won't be able to do it !
(This is also why it's generally forbidden to redistribute copyleft software on physical media without bundling the source code, or without signing a contract that obligates you to provide the source code if requested.)
BobDiggity (mod-scenario-pack)
Re: Integrate mod portal and browser with github/gitlab for releases and branches
While the comment may be less pertinent when dealing with scripted languages it still makes sense. While my familiarity with factorio mod creation specifically is functionaly non-existent, I've enough familiarity with other modding systems to know that source control repos still often have other intermediary files (for example, higher quality assets that are being preserved in case they may be needed in the future, setup files for that IDE may be in the repo, code guidelines for the repo itself, etc...) that there's no reason to provide to end users. Directly downloading the entirety of a repo is often not a good idea, it may not even be in an appropriate file structure to be usable. This is where releases still become useful. A pre-packaged version of the mod the only has the needed parts.
Tags *mark* a release point and are incredibly useful, but of minimal value to an end user. Just simply tagging a release point alone doesn't necessarily make it easy to have an 'installable' version of the mod. I expect that if I ever got into factorio modding, my initial repo setup would place the mod itself in a sub-folder of the git repo with files outside of it. Helps to keep things more organized.
Re: Integrate mod portal and browser with github/gitlab for releases and branches
A few mods have build systems and resources and tests and such in their repo.
The vast majority of factorio mods on github are just the mod folder itself, maybe a readme, nothing more. These would be entirely suitable for direct archive download.
Separately, it would also be possible for the repo to contain some file that tells the mod portal where to find the pieces to download, which would be `/` or `.` or `*` for most mods, or something like `/build/*` for the fancier mods.
The vast majority of factorio mods on github are just the mod folder itself, maybe a readme, nothing more. These would be entirely suitable for direct archive download.
Separately, it would also be possible for the repo to contain some file that tells the mod portal where to find the pieces to download, which would be `/` or `.` or `*` for most mods, or something like `/build/*` for the fancier mods.
- bobingabout
- Smart Inserter

- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Integrate mod portal and browser with github/gitlab for releases and branches
When it comes to coding, I'm basically running on Intuition.
I find Git to not be intuitive, and therefore can't wrap my head around it.
when I'm working on source, I basically just copy commands from a text file into git bash to try and do stuff, then when it fails, ask for help. I pretty much literally have to have someone walk me through how to update my source, or submit a pull request.
mod portal on the other hand... just upload a file, you're done.
so when it comes to integrating github and the mod portal. please no. Life is a headache enough as it is.
I find Git to not be intuitive, and therefore can't wrap my head around it.
when I'm working on source, I basically just copy commands from a text file into git bash to try and do stuff, then when it fails, ask for help. I pretty much literally have to have someone walk me through how to update my source, or submit a pull request.
mod portal on the other hand... just upload a file, you're done.
so when it comes to integrating github and the mod portal. please no. Life is a headache enough as it is.
Re: Integrate mod portal and browser with github/gitlab for releases and branches
Any integration between git repos and the mod portal should be optional. It shouldn't change anything about what you're doing Bob, should just provide options for automatically checking for updates from github/lab/etc...
