Skip to content

Commit

Permalink
Added version signature to config files
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenchristoffer committed Feb 24, 2020
1 parent 348aba6 commit 19496ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Mklinker/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class Config {

public const string configFile = "linker.config";

[XmlAttribute("Version")]
public string version;

[XmlArray("LinkList")]
[XmlArrayItem("Link")]
public List<ConfigLink> linkList { get; private set; }
Expand Down
5 changes: 5 additions & 0 deletions Mklinker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace Mklinker {

public class Program {

public const string VERSION = "v1.1.1";

public static Config config { get; private set; }

private static List<CommandTask> commandTasks = new List<CommandTask>();
Expand Down Expand Up @@ -39,6 +41,8 @@ public class Program {
Console.WriteLine(command.GetName());
}
}

SaveConfig();
}

public static bool IsCommand (string str) {
Expand Down Expand Up @@ -79,6 +83,7 @@ public class Program {
}

public static void SaveConfig () {
config.version = VERSION;
File.WriteAllText(Config.configFile, config.Serialize());
}

Expand Down

0 comments on commit 19496ff

Please sign in to comment.