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

chore: Refactor package packing #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
11 changes: 1 addition & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,11 @@ jobs:
with:
useConfigFile: true
configFilePath: build/gitversion.yml

- name: Build
run: |
cd nuget
dotnet new classlib -f netstandard2.0 -o uno.fonts.fluent
cd uno.fonts.fluent
rm *.cs
dotnet build -c Release
cp bin\Release\netstandard2.0\uno.fonts.fluent.dll ..

- name: Pack
run: |
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower();
build/nuget.exe pack nuget/Uno.Fonts.Fluent.nuspec -Version $adjustedPackageVersion -OutputDirectory ./artifacts
dotnet pack nuget/Uno.Fonts.Fluent.csproj -p:PackageVersion=$adjustedPackageVersion --output ./artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v2
Expand Down
Binary file removed build/nuget.exe
Binary file not shown.
26 changes: 26 additions & 0 deletions nuget/Uno.Fonts.Fluent.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<MinClientVersion>5.0.0</MinClientVersion>
<PackageId>Uno.Fonts.Fluent</PackageId>
<Title>Uno Platform Fluent Font</Title>
<Authors>Uno Platform</Authors>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/unoplatform/uno.fonts</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
<Description>Uno Platform Fluent Font (Windows 11 iconography)</Description>
<Copyright>Copyright (C) 2015-2023 Uno Platform inc. - all rights reserved</Copyright>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/unoplatform/uno.fonts.git</RepositoryUrl>
<IncludeBuildOutput>false</IncludeBuildOutput>

<!-- https://github.com/NuGet/Home/issues/8583 -->
<NoWarn>$(NoWarn);NU5128</NoWarn>
</PropertyGroup>
<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="\"/>
<None Include="buildTransitive/**/*.*" Pack="true" PackagePath="buildTransitive" />
<None Include="../webfonts/Uno Fluent Icons/uno-fluentui-assets.ttf" Pack="true" PackagePath="buildTransitive/Fonts" />
</ItemGroup>
</Project>
26 changes: 0 additions & 26 deletions nuget/Uno.Fonts.Fluent.nuspec

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
<PropertyGroup Condition="'$(UnoFontsFluentDisableImport)'==''">
<UnoPlatformDefaultSymbolsFontFamily>ms-appx://uno.fonts.fluent/Fonts/uno-fluentui-assets.ttf</UnoPlatformDefaultSymbolsFontFamily>
</PropertyGroup>

<Target Name="_UnoAddPriMarker" AfterTargets="ResolvePackageAssets">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could also be BeforeTargets="_UnoFindPackageAssetMarkers". I think both should work.

Copy link
Member

@jeromelaban jeromelaban Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to avoid relying on an internal implementation detail of the marker resolution assembly (assuming that most libraries will also contain code). We still have additional work to do on fonts (default text font), and this may be part of it to include a more robust way of creating font-only packages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand the problem with relying on the internal implementation detail. But anyway, let me revert this part for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of _UnoPriFiles is an internal implementation detail at this time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeromelaban Does it look better now?

<_UnoPriFiles Include="$(MSBuildThisFileDirectory)uno.fonts.fluent.uprimarker" />
</Target>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention of this target is to let Uno correctly detect uprimarker and properly find the font file during ExpandPackageAssets.

</Project>