diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2016-04-26 13:04:05 +0300 |
---|---|---|
committer | Kenneth Skovhede <kenneth@hexad.dk> | 2016-04-26 13:04:05 +0300 |
commit | b37ccfbf30d46b2d243a7613c364cbde4156d169 (patch) | |
tree | 7a60b59371235700b2d5d99abccd4646bfafe6e3 /Duplicati/License | |
parent | ce53e292baf08f2106436de049b01b11f0881261 (diff) |
More prettifying the version number :)
Diffstat (limited to 'Duplicati/License')
-rw-r--r-- | Duplicati/License/VersionNumbers.cs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Duplicati/License/VersionNumbers.cs b/Duplicati/License/VersionNumbers.cs index 8eb87a9cc..40766e47a 100644 --- a/Duplicati/License/VersionNumbers.cs +++ b/Duplicati/License/VersionNumbers.cs @@ -26,6 +26,7 @@ namespace Duplicati.License public static class VersionNumbers
{
public static readonly string TAG;
+ public static readonly string VERSION_NAME;
static VersionNumbers()
{
@@ -41,22 +42,24 @@ namespace Duplicati.License if (string.IsNullOrWhiteSpace(tag))
tag = "";
- else
- tag = " - " + tag;
- TAG = tag.Trim();
+ TAG = tag.Trim();
+
+ var v = VersionNumber;
+ if (!string.IsNullOrWhiteSpace(TAG))
+ v = " - " + TAG;
+#if DEBUG
+ v = " - debug";
+#endif
+ VERSION_NAME = v;
+
}
public static string Version
{
get
{
-#if DEBUG
- string debug = " - DEBUG";
-#else
- string debug = "";
-#endif
- return VersionNumber + TAG + debug;
+ return VERSION_NAME;
}
}
@@ -64,8 +67,6 @@ namespace Duplicati.License {
get
{
- //Override this to display a custom version, e.g.
- //return "1.3.2";
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
|