diff --git a/ATXTray/Properties/Resources.resx b/ATXTray/Properties/Resources.resx index 2b26db5b3048f2e8a930631d6b086d257aa71e2d..719fb31fbd77075d95b9d67df6ceffaa2e4e9704 100644 --- a/ATXTray/Properties/Resources.resx +++ b/ATXTray/Properties/Resources.resx @@ -118,6 +118,12 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="BuildCommit" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\BuildCommit.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> + </data> + <data name="BuildDate" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\BuildDate.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16</value> + </data> <data name="IconDefault" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\IconDefault.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> diff --git a/ATxTray/ATXTray.csproj b/ATxTray/ATXTray.csproj index c73dad1c5b8b188d3da606b6e253f2e038748951..051f9e1f5e751b394a664a1c92f97ba17622a059 100644 --- a/ATxTray/ATXTray.csproj +++ b/ATxTray/ATXTray.csproj @@ -105,8 +105,16 @@ </ItemGroup> <ItemGroup> <Content Include="IconDefault.ico" /> + <None Include="Resources\BuildDate.txt" /> + <None Include="Resources\BuildCommit.txt" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent>PowerShell -NoProfile -ExecutionPolicy RemoteSigned $(SolutionDir)\Scripts\Prepare-Build.ps1 $(ProjectDir)</PreBuildEvent> + </PropertyGroup> + <PropertyGroup> + <PostBuildEvent>PowerShell -Command "Write-Host $(ConfigurationName)" > $(ProjectDir)\Resources\BuildConfiguration.txt</PostBuildEvent> + </PropertyGroup> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> diff --git a/ATxTray/AutoTxTray.cs b/ATxTray/AutoTxTray.cs index 4a32a1a047a9ddf6450851c2cf6145ca0951213a..c0029fa7fb4539c7aa4e6169d3794c101f767a7a 100644 --- a/ATxTray/AutoTxTray.cs +++ b/ATxTray/AutoTxTray.cs @@ -70,11 +70,15 @@ namespace ATxTray var logRule = new LoggingRule("*", LogLevel.Debug, fileTarget); logConfig.LoggingRules.Add(logRule); LogManager.Configuration = logConfig; - + #endregion + Log.Info("-----------------------"); Log.Info("{0} initializing...", AppTitle); + Log.Info("build: [{0}]", Properties.Resources.BuildDate.Trim()); + Log.Info("commit: [{0}]", Properties.Resources.BuildCommit.Trim()); + Log.Info("-----------------------"); Log.Debug(" - config file: [{0}]", ConfigFile); Log.Debug(" - status file: [{0}]", StatusFile); diff --git a/ATxTray/Properties/Resources.Designer.cs b/ATxTray/Properties/Resources.Designer.cs index e8ee16c0f7c7ab9b0dca48375d0a3cef20b7c977..cc28f91d0d48e056ea8f86d1b1efb17ba7900d6a 100644 --- a/ATxTray/Properties/Resources.Designer.cs +++ b/ATxTray/Properties/Resources.Designer.cs @@ -60,6 +60,26 @@ namespace ATxTray.Properties { } } + /// <summary> + /// Looks up a localized string similar to autotransfer-v1-265-g1b03979-unclean + ///. + /// </summary> + internal static string BuildCommit { + get { + return ResourceManager.GetString("BuildCommit", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to 2018-02-06 11:38:53 + ///. + /// </summary> + internal static string BuildDate { + get { + return ResourceManager.GetString("BuildDate", resourceCulture); + } + } + /// <summary> /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// </summary> diff --git a/ATxTray/Resources/.gitignore b/ATxTray/Resources/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..06696d3d12240c7657519d4c0b6895d033dbf687 --- /dev/null +++ b/ATxTray/Resources/.gitignore @@ -0,0 +1,3 @@ +BuildDate.txt +BuildConfiguration.txt +BuildCommit.txt \ No newline at end of file