From e60f9256d1304525cf4aeae2950e9d9a88baebc8 Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Tue, 30 Oct 2018 09:25:51 +0100
Subject: [PATCH] release candidate versions

adding suffix for RC versions in version number (GUI, reports), adding explicit message that this version is not for certification
---
 VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs  | 6 +++++-
 .../VectoCore/OutputData/XML/XMLManufacturerReport.cs    | 6 +++++-
 VectoCore/VectoCore/Utils/VectoVersionCore.tt            | 9 ++++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs
index d90d1a40f1..8125516e31 100644
--- a/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs
+++ b/VectoCore/VectoCore/OutputData/XML/XMLCustomerReport.cs
@@ -151,8 +151,12 @@ namespace TUGraz.VectoCore.OutputData.XML
 
 		private XElement GetApplicationInfo()
 		{
+			var versionNumber = VectoSimulationCore.VersionNumber;
+#if RELEASE_CANDIDATE
+			versionNumber += " !!NOT FOR CERTIFICATION!!";
+#endif
 			return new XElement(tns + XMLNames.Report_ApplicationInfo_ApplicationInformation,
-				new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, VectoSimulationCore.VersionNumber),
+				new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, versionNumber),
 				new XElement(tns + XMLNames.Report_ApplicationInfo_Date,
 					XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc)));
 		}
diff --git a/VectoCore/VectoCore/OutputData/XML/XMLManufacturerReport.cs b/VectoCore/VectoCore/OutputData/XML/XMLManufacturerReport.cs
index 4ab18ea4c8..5ac6e0e68d 100644
--- a/VectoCore/VectoCore/OutputData/XML/XMLManufacturerReport.cs
+++ b/VectoCore/VectoCore/OutputData/XML/XMLManufacturerReport.cs
@@ -342,8 +342,12 @@ namespace TUGraz.VectoCore.OutputData.XML
 
 		private XElement GetApplicationInfo()
 		{
+			var versionNumber = VectoSimulationCore.VersionNumber;
+#if RELEASE_CANDIDATE
+			versionNumber += " !!NOT FOR CERTIFICATION!!";
+#endif
 			return new XElement(tns + XMLNames.Report_ApplicationInfo_ApplicationInformation,
-				new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, VectoSimulationCore.VersionNumber),
+				new XElement(tns + XMLNames.Report_ApplicationInfo_SimulationToolVersion, versionNumber),
 				new XElement(tns + XMLNames.Report_ApplicationInfo_Date,
 					XmlConvert.ToString(DateTime.Now, XmlDateTimeSerializationMode.Utc)));
 		}
diff --git a/VectoCore/VectoCore/Utils/VectoVersionCore.tt b/VectoCore/VectoCore/Utils/VectoVersionCore.tt
index e8d990bf30..568267363d 100644
--- a/VectoCore/VectoCore/Utils/VectoVersionCore.tt
+++ b/VectoCore/VectoCore/Utils/VectoVersionCore.tt
@@ -36,10 +36,17 @@ namespace TUGraz.VectoCore.Utils
 {
 	public static class VectoSimulationCore
 	{
+
+#if RELEASE_CANDIDATE
+		private const string SUFFIX = "-RC";
+#else
+		private const string SUFFIX = "";
+#endif
+
 		public static string VersionNumber
 		{
 			get {
-				return "<#= GetVectoCoreVersionNumber() #>";
+				return "<#= GetVectoCoreVersionNumber() #>" + SUFFIX;
 			}
 		}
 
-- 
GitLab