Skip to content

Commit

Permalink
Merge branch 'release/git_info'
Browse files Browse the repository at this point in the history
  • Loading branch information
paonath committed Aug 6, 2021
2 parents 6537622 + 2a36fd0 commit 3a889ca
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 21 deletions.
15 changes: 3 additions & 12 deletions PH.WorkingDaysAndTime/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,9 @@
<PropertyGroup>
<Authors>Paolo Innocenti</Authors>
<Copyright>Copyright 2021 (c) Paolo Innocenti - [email protected] </Copyright>
<AssemblyVersion>2.0.9</AssemblyVersion>
<FileVersion>2.0.9</FileVersion>
<Version>2.0.9</Version>
<AssemblyVersion>2.0.10</AssemblyVersion>
<FileVersion>2.0.10</FileVersion>
<Version>2.0.10</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<SourceRevisionId>build-$([System.DateTime]::UtcNow.ToString("yyyyMMddHHmmss"))</SourceRevisionId>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<SourceRevisionId>rel-$([System.DateTime]::UtcNow.ToString("yyyyMMdd"))</SourceRevisionId>
</PropertyGroup>

</Project>

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>

<TargetFrameworks>netstandard2.0</TargetFrameworks>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand All @@ -15,13 +16,15 @@

The application works only counting the dates forward and it is assumed that the date entered as the first parameter is a working day.</Description>
<PackageReleaseNotes>
Now able to add multi-calculated holidays to your configuration
Just added git build info from https://github.com/devlooped/GitInfo
</PackageReleaseNotes>


<PackageTags>work-days,DateTime,work-hours,work-minutes,work-DateTime,holiday,timespan, time-slices, holiday</PackageTags>

<PackageVersion>2.0.9</PackageVersion>
<PackageVersion>2.0.10</PackageVersion>


<Authors>Paolo Innocenti</Authors>
<Copyright>Copyright PH 2021 (c) [email protected]. All rights reserved.</Copyright>
<RepositoryUrl>https://github.com/paonath/PH.WorkingDaysAndTime</RepositoryUrl>
Expand All @@ -42,16 +45,34 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="GitInfo" Version="2.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="[1.0.0,)" PrivateAssets="All" />
</ItemGroup>


<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="[11.0.2,)" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="dotnet pack $(ProjectPath) --no-build --include-source --include-symbols --output $(SolutionDir)PHTempPackages\ " />
<Exec Command="nuget init $(SolutionDir)PHTempPackages\ $(SolutionDir)PHPackages\ " />


<PropertyGroup Label="GitInfo Properties">
<GitThisAssembly>true</GitThisAssembly>
<GitThisAssemblyMetadata>true</GitThisAssemblyMetadata>

</PropertyGroup>



<Target Name="PopulateInfo" DependsOnTargets="GitInfo" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<RepositoryBranch>$(GitBranch)</RepositoryBranch>
<RepositoryCommit>$(GitCommit)</RepositoryCommit>
<SourceRevisionId>$(GitBranch) $(GitCommit) $(GitBaseTag) rel-$([System.DateTime]::UtcNow.ToString("yyyyMMddHHmmss"))</SourceRevisionId>
</PropertyGroup>
</Target>

</Project>

0 comments on commit 3a889ca

Please sign in to comment.