Optimize --version for semantic versioning.

master v1.2.0
Icedream 2015-04-18 23:27:12 +02:00
parent cd6d33f018
commit 69913ce25d
1 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,12 @@ namespace GarrysMod.AddonCreator
switch (args.Length == 0 ? "" : args[0])
{
case "--version":
Console.WriteLine("{0} v{1}", Assembly.GetExecutingAssembly().GetName().Name, Assembly.GetExecutingAssembly().GetName().Version);
Console.WriteLine("{0} v{1}",
Assembly.GetExecutingAssembly().GetName().Name,
((AssemblyInformationalVersionAttribute)
Assembly.GetExecutingAssembly().GetCustomAttributes(
typeof (AssemblyInformationalVersionAttribute), false).Single())
.InformationalVersion.Split('+').First());
args = args.Skip(1).ToArray();
break;
case "--minimize-lua":