Skip to content

Commit

Permalink
chore: Adjust local version
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Apr 19, 2024
1 parent 21d4d17 commit d9abffd
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions samples/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
<Project>
<ItemGroup>
<PackageReference Include="Uno.Resizetizer" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Uno.Resizetizer" />
</ItemGroup>

<Target Name="GetResizetizerVersion"
BeforeTargets="CollectPackageReferences;Restore;_GetAllRestoreProjectPathItems;UnoImplicitPackages">
<Target Name="GetResizetizerVersion"
BeforeTargets="CollectPackageReferences;Restore;_GetAllRestoreProjectPathItems;UnoImplicitPackages">

<Error Text="You must run `dotnet pack` on Uno.Resizetizer before building the samples."
Condition="!Exists('$(MSBuildThisFileDirectory)packages')" />
<Error Text="You must run `dotnet pack` on Uno.Resizetizer before building the samples."
Condition="!Exists('$(MSBuildThisFileDirectory)packages')" />

<ItemGroup>
<_LocalPackage Include="$(MSBuildThisFileDirectory)packages\Uno.Resizetizer.*.nupkg" />
</ItemGroup>
<ItemGroup>
<_LocalPackage Include="$(MSBuildThisFileDirectory)packages\Uno.Resizetizer.*.nupkg" />
</ItemGroup>

<PropertyGroup>
<_LocalPackageVersion>$([System.Text.RegularExpressions.Regex]::Replace(%(_LocalPackage.Filename), '^(Uno\.Resizetizer\.)', ''))</_LocalPackageVersion>
</PropertyGroup>

<Message Text="Using resizetizer $(_LocalPackageVersion)"
Importance="high" />
<PropertyGroup>
<_LocalPackageVersion>$([System.Text.RegularExpressions.Regex]::Replace(%(_LocalPackage.Filename), '^(Uno\.Resizetizer\.)', ''))</_LocalPackageVersion>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="Uno.Resizetizer" Version="$(_LocalPackageVersion)" />
<PackageReference Include="Uno.Resizetizer" />
</ItemGroup>

</Target>
<Message Text="Using resizetizer $(_LocalPackageVersion)"
Importance="high" />

<ItemGroup Condition="'$(UsingUnoSdk)'==''">
<PackageVersion Include="Uno.Resizetizer" Version="$(_LocalPackageVersion)" />
</ItemGroup>

<PropertyGroup>
<UnoResizetizerVersion>$(_LocalPackageVersion)</UnoResizetizerVersion>
</PropertyGroup>

</Target>
</Project>

0 comments on commit d9abffd

Please sign in to comment.