From d008403a1bee72c91c08ac58028593de6414f4fc Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 28 May 2024 17:26:45 -0700 Subject: [PATCH 1/5] WIP --- Directory.Build.props | 1 + Directory.Packages.props | 4 +-- .../Extensions/HttpExtensionsTests.cs | 2 +- .../IntelliTect.Multitool.Tests.csproj | 6 ++++- .../Build/IntelliTect.Multitool.targets | 27 +++++++++++++++---- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index eeb84d5..4338711 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -20,6 +20,7 @@ true enable + true diff --git a/Directory.Packages.props b/Directory.Packages.props index b9ecc9c..1746771 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/IntelliTect.Multitool.Tests/Extensions/HttpExtensionsTests.cs b/IntelliTect.Multitool.Tests/Extensions/HttpExtensionsTests.cs index 01ad2e5..b26cafa 100644 --- a/IntelliTect.Multitool.Tests/Extensions/HttpExtensionsTests.cs +++ b/IntelliTect.Multitool.Tests/Extensions/HttpExtensionsTests.cs @@ -15,7 +15,7 @@ static HttpExtensionsTests() [InlineData("https://thisisaverybadurlthatwillnotworkhopefullyever.com/", false)] [InlineData("https://www.google.com/", true)] [InlineData("https://api.github.com/meta", true)] - public async void ValidateUri_CheckUrl_SuccessIsAsExpected(string urlUnderTest, bool expected) + public async Task ValidateUri_CheckUrl_SuccessIsAsExpected(string urlUnderTest, bool expected) { Assert.Equal(expected, await HttpClient.ValidateUri(new Uri(urlUnderTest), new System.Net.Http.Headers.ProductInfoHeaderValue(new System.Net.Http.Headers.ProductHeaderValue("IntelliTect.Multitool.Testing")))); } diff --git a/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj b/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj index 93c3503..d0a551f 100644 --- a/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj +++ b/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj @@ -6,6 +6,10 @@ false + + true> + + @@ -20,4 +24,4 @@ - + \ No newline at end of file diff --git a/IntelliTect.Multitool/Build/IntelliTect.Multitool.targets b/IntelliTect.Multitool/Build/IntelliTect.Multitool.targets index 8c6a775..f2f9edb 100644 --- a/IntelliTect.Multitool/Build/IntelliTect.Multitool.targets +++ b/IntelliTect.Multitool/Build/IntelliTect.Multitool.targets @@ -1,9 +1,26 @@  - - - <_Parameter1>$([System.DateTime]::UtcNow.ToString("O")) - - + + + <_Parameter1>$([System.DateTime]::UtcNow.ToString("O")) + + + + + false + + true + + + + true + From 59293601e3c22f2d9ffd352b64340d3010e34e85 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Wed, 29 May 2024 09:21:21 -0700 Subject: [PATCH 2/5] Update --- .../IntelliTect.Multitool.Tests.csproj | 2 +- IntelliTect.Multitool/Build/IntelliTect.Multitool.targets | 4 ---- README.md | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj b/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj index d0a551f..26527de 100644 --- a/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj +++ b/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj @@ -7,7 +7,7 @@ - true> + true diff --git a/IntelliTect.Multitool/Build/IntelliTect.Multitool.targets b/IntelliTect.Multitool/Build/IntelliTect.Multitool.targets index f2f9edb..b6a3294 100644 --- a/IntelliTect.Multitool/Build/IntelliTect.Multitool.targets +++ b/IntelliTect.Multitool/Build/IntelliTect.Multitool.targets @@ -18,10 +18,6 @@ '$(CODEBUILD_CI)' == 'true'">true - - true - - $([System.IO.Path]::GetTempPath()) diff --git a/README.md b/README.md index 9998111..51df33c 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ ## ReleaseDateAttribute - Gets an UTC DateTime of compile time. Allows us to determine the build date/time +### How to use + +- To help [hot reload in visual studio work properly](https://github.com/IntelliTect/Multitool/issues/125), the release date attribute will be automatically be generated during compilation on a CI runner, but it won’t generate locally by default. If you want it to generate locally, set the `ReleaseDateAttribute` to true within a property group in your project file. (`true`) + ### Blog Post/Additional Information: [How To Display the Build Date of a .NET Application](https://intellitect.com/blog/build-date-net-application/) ### Samples: From 6e8ae8a826ca8f8b19d27ba312c69880cbd6b7ee Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Wed, 29 May 2024 09:23:50 -0700 Subject: [PATCH 3/5] update targets --- .../IntelliTect.Multitool.Tests.csproj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj b/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj index 26527de..792775f 100644 --- a/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj +++ b/IntelliTect.Multitool.Tests/IntelliTect.Multitool.Tests.csproj @@ -1,12 +1,14 @@  - netcoreapp3.1; net6.0; net8.0 + net8.0 false - + + + true From cd29bcfbe7722decd0f9fefdc94a5de822c8559f Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Wed, 29 May 2024 09:31:40 -0700 Subject: [PATCH 4/5] Minor readme update --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 51df33c..6e5a973 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,6 @@ ## ReleaseDateAttribute - Gets an UTC DateTime of compile time. Allows us to determine the build date/time -### How to use - -- To help [hot reload in visual studio work properly](https://github.com/IntelliTect/Multitool/issues/125), the release date attribute will be automatically be generated during compilation on a CI runner, but it won’t generate locally by default. If you want it to generate locally, set the `ReleaseDateAttribute` to true within a property group in your project file. (`true`) - ### Blog Post/Additional Information: [How To Display the Build Date of a .NET Application](https://intellitect.com/blog/build-date-net-application/) ### Samples: @@ -41,6 +37,10 @@ // Result is "Build: 8 Feb, 2023 11:36:31 AM" ``` +### Miscellaneous Information: + +- To help [hot reload in visual studio work properly](https://github.com/IntelliTect/Multitool/issues/125), the release date attribute will be automatically be generated during compilation on a CI runner, but it won’t generate locally by default. If you want it to generate locally, set the `ReleaseDateAttribute` to true within a property group in your project file. (`true`) + ## RepositoryPaths - Provides consistent environment-independent normalized pathing within a git repository ### Samples: From 344aab22971036ddc2c7b541db69e8edc71c18f7 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Wed, 29 May 2024 09:39:55 -0700 Subject: [PATCH 5/5] nit --- IntelliTect.Multitool.sln | 1 - 1 file changed, 1 deletion(-) diff --git a/IntelliTect.Multitool.sln b/IntelliTect.Multitool.sln index b0fa57a..b885757 100644 --- a/IntelliTect.Multitool.sln +++ b/IntelliTect.Multitool.sln @@ -8,7 +8,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntelliTect.Multitool.Tests EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7FB66610-EB11-460E-8CC8-F49044F452D0}" ProjectSection(SolutionItems) = preProject - appveyor.yml = appveyor.yml .github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml .github\workflows\deploy.yml = .github\workflows\deploy.yml Directory.Build.props = Directory.Build.props