BattletechModders / ModTek

Mod system for HBS's PC game BattleTech.
GNU Lesser General Public License v2.1
121 stars 34 forks source link

Automated versioning for dll #96

Closed CptMoore closed 5 years ago

CptMoore commented 5 years ago

For MechEngineer, I use GitVersionTask to do automated assemblyinfo versioning as part of building. Just tag the HEAD and rebuild the dll. Works great, could quickly port it to ModTek.

CptMoore commented 5 years ago

I've tested GitVersionTask on Linux and its currently buggy

hopefully https://github.com/GitTools/GitVersion/issues/1511 will fix it

until then I'm hesitant to put it in ModTek, do we only use Windows for releases?

janxious commented 5 years ago

I don't know what @Mpstark uses, but I was building MT on MacOS for the last half year.

janxious commented 5 years ago

This seems like on *nix it could be solved with a small git commit hook and regex. I suspect powershell can do it easily, too, but I don't know anything about that.

CptMoore commented 5 years ago

I rather wait for GitVersionTask to be fixed, it also does smart increments, e.g. if you have 1.0.3 tagged, but have untagged commits afterwards on your current branch, it will compile as 1.0.4. It is the ultimate tool for building these things. Issue is that GitVersionTask isnt using the git nuget package, but packaging libgit itself. That will hopefully change soon.

In any case, I'll create a PR for @janxious to test on mac!

CptMoore commented 5 years ago

@jo @Mpstark https://github.com/orgs/BattletechModders/teams/btml-modtek does not have access to ModTek, couldnt push my branch :(

janxious commented 5 years ago

@CptMoore Should be fixed now. Sorry about that.