more stuff
This commit is contained in:
parent
3ca0fcf457
commit
7b78b9578b
|
|
@ -194,12 +194,19 @@ namespace NovetusCMD
|
||||||
if (GlobalVars.IsSnapshot == true)
|
if (GlobalVars.IsSnapshot == true)
|
||||||
{
|
{
|
||||||
var versionInfo = FileVersionInfo.GetVersionInfo(GlobalVars.BasePath + "\\Novetus.exe");
|
var versionInfo = FileVersionInfo.GetVersionInfo(GlobalVars.BasePath + "\\Novetus.exe");
|
||||||
GlobalVars.Version = lines[6].Replace("%version%", lines[0]).Replace("%build%", versionInfo.ProductBuildPart.ToString()).Replace("%revision%", versionInfo.FilePrivatePart.ToString());
|
GlobalVars.Version = lines[6].Replace("%version%", lines[0])
|
||||||
string[] changelogedit = File.ReadAllLines(GlobalVars.BasePath + "\\changelog.txt");
|
.Replace("%build%", versionInfo.ProductBuildPart.ToString())
|
||||||
if (!changelogedit[0].Equals(GlobalVars.Version))
|
.Replace("%revision%", versionInfo.FilePrivatePart.ToString())
|
||||||
|
.Replace("%snapshot-revision%", lines[7]);
|
||||||
|
string changelog = GlobalVars.BasePath + "\\changelog.txt";
|
||||||
|
if (File.Exists(changelog))
|
||||||
{
|
{
|
||||||
changelogedit[0] = GlobalVars.Version;
|
string[] changelogedit = File.ReadAllLines(changelog);
|
||||||
File.WriteAllLines(GlobalVars.BasePath + "\\changelog.txt", changelogedit);
|
if (!changelogedit[0].Equals(GlobalVars.Version))
|
||||||
|
{
|
||||||
|
changelogedit[0] = GlobalVars.Version;
|
||||||
|
File.WriteAllLines(changelog, changelogedit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -367,12 +367,19 @@ namespace NovetusLauncher
|
||||||
GlobalVars.IsSnapshot = Convert.ToBoolean(lines[5]);
|
GlobalVars.IsSnapshot = Convert.ToBoolean(lines[5]);
|
||||||
if (GlobalVars.IsSnapshot == true)
|
if (GlobalVars.IsSnapshot == true)
|
||||||
{
|
{
|
||||||
GlobalVars.Version = lines[6].Replace("%version%", lines[0]).Replace("%build%", Assembly.GetExecutingAssembly().GetName().Version.Build.ToString()).Replace("%revision%", Assembly.GetExecutingAssembly().GetName().Version.Revision.ToString());
|
GlobalVars.Version = lines[6].Replace("%version%", lines[0])
|
||||||
string[] changelogedit = File.ReadAllLines(GlobalVars.BasePath + "\\changelog.txt");
|
.Replace("%build%", Assembly.GetExecutingAssembly().GetName().Version.Build.ToString())
|
||||||
if (!changelogedit[0].Equals(GlobalVars.Version))
|
.Replace("%revision%", Assembly.GetExecutingAssembly().GetName().Version.Revision.ToString())
|
||||||
|
.Replace("%snapshot-revision%", lines[7]);
|
||||||
|
string changelog = GlobalVars.BasePath + "\\changelog.txt";
|
||||||
|
if (File.Exists(changelog))
|
||||||
{
|
{
|
||||||
changelogedit[0] = GlobalVars.Version;
|
string[] changelogedit = File.ReadAllLines(changelog);
|
||||||
File.WriteAllLines(GlobalVars.BasePath + "\\changelog.txt", changelogedit);
|
if (!changelogedit[0].Equals(GlobalVars.Version))
|
||||||
|
{
|
||||||
|
changelogedit[0] = GlobalVars.Version;
|
||||||
|
File.WriteAllLines(changelog, changelogedit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,19 @@ namespace NovetusLauncher
|
||||||
GlobalVars.IsSnapshot = Convert.ToBoolean(lines[5]);
|
GlobalVars.IsSnapshot = Convert.ToBoolean(lines[5]);
|
||||||
if (GlobalVars.IsSnapshot == true)
|
if (GlobalVars.IsSnapshot == true)
|
||||||
{
|
{
|
||||||
GlobalVars.Version = lines[6].Replace("%version%", lines[0]).Replace("%build%", Assembly.GetExecutingAssembly().GetName().Version.Build.ToString()).Replace("%revision%", Assembly.GetExecutingAssembly().GetName().Version.Revision.ToString());
|
GlobalVars.Version = lines[6].Replace("%version%", lines[0])
|
||||||
string[] changelogedit = File.ReadAllLines(GlobalVars.BasePath + "\\changelog.txt");
|
.Replace("%build%", Assembly.GetExecutingAssembly().GetName().Version.Build.ToString())
|
||||||
if (!changelogedit[0].Equals(GlobalVars.Version))
|
.Replace("%revision%", Assembly.GetExecutingAssembly().GetName().Version.Revision.ToString())
|
||||||
|
.Replace("%snapshot-revision%", lines[7]);
|
||||||
|
string changelog = GlobalVars.BasePath + "\\changelog.txt";
|
||||||
|
if (File.Exists(changelog))
|
||||||
{
|
{
|
||||||
changelogedit[0] = GlobalVars.Version;
|
string[] changelogedit = File.ReadAllLines(changelog);
|
||||||
File.WriteAllLines(GlobalVars.BasePath + "\\changelog.txt", changelogedit);
|
if (!changelogedit[0].Equals(GlobalVars.Version))
|
||||||
|
{
|
||||||
|
changelogedit[0] = GlobalVars.Version;
|
||||||
|
File.WriteAllLines(changelog, changelogedit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -64,12 +64,19 @@ namespace NovetusLauncher
|
||||||
GlobalVars.IsSnapshot = Convert.ToBoolean(lines[5]);
|
GlobalVars.IsSnapshot = Convert.ToBoolean(lines[5]);
|
||||||
if (GlobalVars.IsSnapshot == true)
|
if (GlobalVars.IsSnapshot == true)
|
||||||
{
|
{
|
||||||
GlobalVars.Version = lines[6].Replace("%version%", lines[0]).Replace("%build%", Assembly.GetExecutingAssembly().GetName().Version.Build.ToString()).Replace("%revision%", Assembly.GetExecutingAssembly().GetName().Version.Revision.ToString());
|
GlobalVars.Version = lines[6].Replace("%version%", lines[0])
|
||||||
string[] changelogedit = File.ReadAllLines(GlobalVars.BasePath + "\\changelog.txt");
|
.Replace("%build%", Assembly.GetExecutingAssembly().GetName().Version.Build.ToString())
|
||||||
if (!changelogedit[0].Equals(GlobalVars.Version))
|
.Replace("%revision%", Assembly.GetExecutingAssembly().GetName().Version.Revision.ToString())
|
||||||
|
.Replace("%snapshot-revision%", lines[7]);
|
||||||
|
string changelog = GlobalVars.BasePath + "\\changelog.txt";
|
||||||
|
if (File.Exists(changelog))
|
||||||
{
|
{
|
||||||
changelogedit[0] = GlobalVars.Version;
|
string[] changelogedit = File.ReadAllLines(changelog);
|
||||||
File.WriteAllLines(GlobalVars.BasePath + "\\changelog.txt", changelogedit);
|
if (!changelogedit[0].Equals(GlobalVars.Version))
|
||||||
|
{
|
||||||
|
changelogedit[0] = GlobalVars.Version;
|
||||||
|
File.WriteAllLines(changelog, changelogedit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue