diff --git a/DailyStatus.Common/BuildInfo.cs b/DailyStatus.Common/BuildInfo.cs new file mode 100644 index 0000000..39d5955 --- /dev/null +++ b/DailyStatus.Common/BuildInfo.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DailyStatus.Common +{ + public static class DailyStatusBuildInfo + { + public static string ShortVersion => $"{ThisAssembly.Git.BaseTag}-{ThisAssembly.Git.Commit}"; + public static string LongVersion => $"{ThisAssembly.Git.BaseTag}-{ThisAssembly.Git.Branch}-{ThisAssembly.Git.Commit}-{ThisAssembly.Git.Commits + (ThisAssembly.Git.IsDirty ? "-dirty" : "")}"; + } +} diff --git a/DailyStatus.Common/DailyStatus.Common.csproj b/DailyStatus.Common/DailyStatus.Common.csproj index d628e10..e2bffab 100644 --- a/DailyStatus.Common/DailyStatus.Common.csproj +++ b/DailyStatus.Common/DailyStatus.Common.csproj @@ -11,6 +11,8 @@ DailyStatus.Common v4.6.1 512 + + true @@ -81,6 +83,7 @@ + @@ -96,4 +99,11 @@ + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/DailyStatus.Common/packages.config b/DailyStatus.Common/packages.config index 732558d..6d0d5e7 100644 --- a/DailyStatus.Common/packages.config +++ b/DailyStatus.Common/packages.config @@ -1,6 +1,7 @@  + diff --git a/DailyStatus.UI/App.config b/DailyStatus.UI/App.config index 2161694..0fef935 100644 --- a/DailyStatus.UI/App.config +++ b/DailyStatus.UI/App.config @@ -33,4 +33,6 @@ + + diff --git a/DailyStatus.UI/ViewModel/StatusViewModel.cs b/DailyStatus.UI/ViewModel/StatusViewModel.cs index 1a000a4..72e3d58 100644 --- a/DailyStatus.UI/ViewModel/StatusViewModel.cs +++ b/DailyStatus.UI/ViewModel/StatusViewModel.cs @@ -399,6 +399,7 @@ public List ContextMenu SumSince = prompt.Date ?? new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1); }) }); + items.Add(new MenuItem() { Header = DailyStatusBuildInfo.ShortVersion, Command = new RelayCommand((_)=> { })}); items.Add(new MenuItem() { Header = "Minimize", Command = new RelayCommand((_) => WindowState = WindowState.Minimized) }); items.Add(new MenuItem() { Header = "Close", Command = CloseCommand }); return items;