Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding metadata targets file #123

Merged
merged 1 commit into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/Resizetizer/Directory.UnoMetadata.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project>
<PropertyGroup>
<Authors Condition="'$(Authors)'=='' or '$(Authors)'=='$(PackageId)' or '$(Authors)'=='$(AssemblyName)'">Uno Platform</Authors>
<Copyright Condition="'$(Copyright)'==''">Copyright (C) 2015-$([System.DateTime]::Now.ToString(`yyyy`)) Uno Platform inc. - all rights reserved</Copyright>
<RepositoryUrl Condition="'$(RepositoryUrl)'==''">$(BUILD_REPOSITORY_URI)</RepositoryUrl>
<Product Condition="'$(Product)'==''">$(AssemblyName) ($(TargetFramework))</Product>
<PackageLicenseExpression Condition="'$(PackageLicenseExpression)'==''">Apache-2.0</PackageLicenseExpression>
<DefaultLanguage Condition="'$(DefaultLanguage)'==''">en-US</DefaultLanguage>
</PropertyGroup>

<Target Name="DownloadAndSetPackageIcon" AfterTargets="Build" Condition="'$(PackageIcon)'==''">
<PropertyGroup>
<IconUrl>https://nv-assets.azurewebsites.net/logos/uno.png</IconUrl>
</PropertyGroup>

<DownloadFile SourceUrl="$(IconUrl)" DestinationFolder="$(IntermediateOutputPath)">
<Output TaskParameter="DownloadedFile" PropertyName="UnoPackageDownloadedIcon" />
</DownloadFile>

<PropertyGroup>
<PackageIcon>$([System.IO.Path]::GetFileName($(UnoPackageDownloadedIcon)))</PackageIcon>
</PropertyGroup>

<ItemGroup>
<None Include="$(UnoPackageDownloadedIcon)" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>
</Target>
</Project>
8 changes: 2 additions & 6 deletions src/Resizetizer/src/Resizetizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@
</PropertyGroup>

<PropertyGroup>
<Authors>Uno Platform</Authors>
<AssemblyName>Uno.Resizetizer_v0</AssemblyName>
<PackageProjectUrl>https://github.com/unoplatform/uno.resizetizer</PackageProjectUrl>
<RepositoryUrl>$(BUILD_REPOSITORY_URI)</RepositoryUrl>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<RepositoryCommit>$(GITVERSION_SHA)</RepositoryCommit>
<PackageId>Uno.Resizetizer</PackageId>
<Description>Uno Platform package support for images.</Description>
<Copyright>Copyright (C) 2015-$([System.DateTime]::Now.ToString(`yyyy`)) Uno Platform - all rights reserved</Copyright>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>logo.png</PackageIcon>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down Expand Up @@ -67,4 +61,6 @@
<Copy SourceFiles="@(_CopyItems)" DestinationFolder="$(UnoNuSpecDirectory)%(RecursiveDir)" ContinueOnError="true" Retries="0" />
</Target>

<Import Project="../Directory.UnoMetadata.targets" />

</Project>