Skip to content

Commit

Permalink
Add -dev to locally built packages
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Aug 25, 2024
1 parent 227b358 commit ac7cc01
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,22 @@
<!-- Supplement Nerdbank.GitVersioning version calculations -->
<Target Name="UpdateAssemblyVersionInfo" BeforeTargets="GenerateAssemblyNBGVVersionInfo" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<!-- AssemblyVersion and AssemblyFileVersion should be x.y.z -->
<AssemblyVersion>$(BuildVersion3Components)</AssemblyVersion>
<AssemblyFileVersion>$(BuildVersion3Components)</AssemblyFileVersion>
<!-- Local builds should have a '-dev' suffix on the build number -->
<PrereleaseSuffix Condition=" '$(GITHUB_ACTIONS)' != 'true' ">-dev</PrereleaseSuffix>
<!-- AssemblyVersion and AssemblyFileVersion should be x.y.z.0 -->
<AssemblyVersion>$(BuildVersionSimple)</AssemblyVersion>
<AssemblyFileVersion>$(BuildVersionSimple)</AssemblyFileVersion>
<!-- Always put the Git hash in the informational version, even for non-pre-release versions -->
<AssemblyInformationalVersion>$(BuildVersionSimple)$(PrereleaseVersion)+$(GitCommitIdShort)</AssemblyInformationalVersion>
<AssemblyInformationalVersion>$(BuildVersionSimple)$(PrereleaseVersion)$(PrereleaseSuffix)+$(GitCommitIdShort)</AssemblyInformationalVersion>
</PropertyGroup>
</Target>

<Target Name="UpdateNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<!-- Local builds should have a '-dev' suffix on the build number -->
<PrereleaseSuffix Condition=" '$(GITHUB_ACTIONS)' != 'true' ">-dev</PrereleaseSuffix>
<!-- Never put the Git hash in the package version -->
<PackageVersion>$(BuildVersion3Components)$(PrereleaseVersion)</PackageVersion>
<PackageVersion>$(BuildVersionSimple)$(PrereleaseVersion)$(PrereleaseSuffix)</PackageVersion>
<!-- Pass through values we don't know ahead of time for any hand-crafted .nuspec files -->
<NuspecProperties>
Configuration=$(Configuration);
Expand Down

0 comments on commit ac7cc01

Please sign in to comment.