Skip to content

Commit

Permalink
add safety check for misconfigured version (#946)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvreony committed Jan 14, 2022
1 parent 124aa7d commit 7cc8826
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
<PropertyGroup Condition="$(TargetFramework.StartsWith('tizen'))">
<DefineConstants>$(DefineConstants);TIZEN</DefineConstants>
</PropertyGroup>

<Target Name="CheckVersionSet" BeforeTargets="Compile">
<Error Condition="$(Version) == '' or $(Version) == '0.0.0.0' or $(Version) == '1.0.0.0'" Text="The Version is not set. Check the CI process has NBGV enabled and configured correctly." />
</Target>

<Target Name="ValidateNugetProperties" Condition="!$(IsTestProject) or $(IsTestProject) == ''" BeforeTargets="Compile">
<Error Condition="$(PackageDescription) == '' or $(PackageDescription) == $(DefaultPackageDescription)" Text="The Nuget PackageDescription property needs to be set for the project. Currently : '$(PackageDescription)'" />
Expand Down

0 comments on commit 7cc8826

Please sign in to comment.