Skip to content

Commit

Permalink
simplify packaging (#660)
Browse files Browse the repository at this point in the history
Simplify FodyPackaging
  • Loading branch information
SimonCropp committed Jan 29, 2019
1 parent 25f6da5 commit 6386937
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions FodyPackaging/build/FodyPackaging.props
Expand Up @@ -2,10 +2,6 @@
<PropertyGroup>
<PackageId Condition="'$(PackageId)' == ''">$(MSBuildProjectName).Fody</PackageId>
<PackageTags Condition="'$(PackageTags)' == ''">ILWeaving, Fody, Cecil, AOP</PackageTags>
<FodySolutionDir Condition="'$(FodySolutionDir)' == '' AND '$(SolutionDir)' != '*Undefined*'">$(SolutionDir)</FodySolutionDir>
<FodySolutionDir Condition="'$(FodySolutionDir)' == ''">$(MSBuildProjectDirectory)</FodySolutionDir>
<FodySolutionDir Condition="!HasTrailingSlash('$(FodySolutionDir)')">$(FodySolutionDir)\</FodySolutionDir>
<PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(FodySolutionDir)nugets</PackageOutputPath>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetsForTfmSpecificContentInPackage Condition="'$(SkipPackagingDefaultFiles)' != 'true'">$(TargetsForTfmSpecificContentInPackage);IncludeFodyFiles</TargetsForTfmSpecificContentInPackage>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand All @@ -14,39 +10,11 @@
<DisableFody>true</DisableFody>
<WeaverDirPath Condition="'$(WeaverDirPath)' == ''">..\$(PackageId)\bin\$(Configuration)\</WeaverDirPath>
<WeaverPropsFile Condition="'$(WeaverPropsFile)' == ''">$(MSBuildThisFileDirectory)..\Weaver.props</WeaverPropsFile>
<GitHubOrganization Condition="'$(GitHubOrganization)' == ''">Fody</GitHubOrganization>
<LocalGitRootFolder Condition="'$(LocalGitRootFolder)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildProjectDirectory)', '.git\index'))</LocalGitRootFolder>
<LocalGitRootFolder Condition="'$(LocalGitRootFolder)' == ''">$(FodySolutionDir)</LocalGitRootFolder>
<LocalGitRootFolder Condition="!HasTrailingSlash('$(LocalGitRootFolder)')">$(LocalGitRootFolder)\</LocalGitRootFolder>
</PropertyGroup>

<ItemGroup>
<PackageIconFile Include="$(LocalGitRootFolder)*icon*.png" />
<PackageLicenseFile Include="$(LocalGitRootFolder)*license*" />
</ItemGroup>

<PropertyGroup>
<PackageIconFileName Condition="'$(PackageIconFileName)' == ''">@(PackageIconFile->'%(Filename)%(Extension)')</PackageIconFileName>
<PackageLicenseFileName Condition="'$(PackageLicenseFileName)' == ''">@(PackageLicenseFile->'%(Filename)%(Extension)')</PackageLicenseFileName>
</PropertyGroup>

<PropertyGroup Condition="'$(GitHubOrganization)' == 'Fody'">
<PackageIconUrl Condition="'$(PackageIconUrl)' == ''">https://raw.githubusercontent.com/Fody/$(SolutionName)/master/package_icon.png</PackageIconUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == ''">http://github.com/Fody/$(SolutionName)</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(GitHubOrganization)' != 'Fody'">
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == ''">http://github.com/$(GitHubOrganization)/$(PackageId)</PackageProjectUrl>
<PackageIconUrl Condition="'$(PackageIconUrl)' == '' And '$(PackageIconFileName)' != ''">https://raw.githubusercontent.com/$(GitHubOrganization)/$(PackageId)/master/$(PackageIconFileName)</PackageIconUrl>
<PackageLicenseFile Condition="'$(PackageLicenseExpression)' == '' AND '$(PackageLicenseFile)' == '' AND '$(PackageLicenseUrl)' == '' AND '$(PackageLicenseFileName)' != ''">$(PackageLicenseFileName)</PackageLicenseFile>
</PropertyGroup>

<ItemGroup>
<!-- fake reference to the weaver project to work around this bug https://github.com/Microsoft/msbuild/issues/2661 -->
<ProjectReference Include="..\$(PackageId)\$(PackageId).csproj"
PrivateAssets="All"
Condition="$(TargetFramework)=='fake'" />
</ItemGroup>

</Project>
</Project>

0 comments on commit 6386937

Please sign in to comment.