Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminMichaelis committed May 29, 2024
1 parent 88300e1 commit d008403
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Moq" Version="4.20.69" />
<PackageVersion Include="xunit" Version="2.7.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.8" />
<PackageVersion Include="xunit" Version="2.8.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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"))));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup>
<ReleaseDateAttribute>true></ReleaseDateAttribute>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Moq" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
Expand All @@ -20,4 +24,4 @@
<ItemGroup>
<ProjectReference Include="..\IntelliTect.Multitool\IntelliTect.Multitool.csproj" />
</ItemGroup>
</Project>
</Project>
27 changes: 22 additions & 5 deletions IntelliTect.Multitool/Build/IntelliTect.Multitool.targets
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
<Project>
<ItemGroup>
<AssemblyAttribute Include="IntelliTect.Multitool.ReleaseDate">
<_Parameter1>$([System.DateTime]::UtcNow.ToString("O"))</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Condition="'$(CI)' == 'true' OR '$(ReleaseDateAttribute)' == 'true'" Include="IntelliTect.Multitool.ReleaseDate">
<_Parameter1>$([System.DateTime]::UtcNow.ToString("O"))</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<PropertyGroup Label="CI" Condition="'$(CI)' == ''">
<CI>false</CI>
<!-- GH, CircleCI, GitLab and BitBucket already use CI -->
<CI Condition="'$(TF_BUILD)' == 'true' or
'$(TEAMCITY_VERSION)' != '' or
'$(APPVEYOR)' != '' or
'$(BuildRunner)' == 'MyGet' or
'$(JENKINS_URL)' != '' or
'$(TRAVIS)' == 'true' or
'$(BUDDY)' == 'true' or
'$(CODEBUILD_CI)' == 'true'">true</CI>
</PropertyGroup>

<PropertyGroup>
<ReleaseDateAttribute>true</ReleaseDateAttribute>
</PropertyGroup>

<Target Name="WriteLaunchers" AfterTargets="CopyFilesToOutputDirectory">
<PropertyGroup>
Expand Down

0 comments on commit d008403

Please sign in to comment.