forked from dotnet/source-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is https://github.com/Humanizr/Humanizer (different from https://github.com/Humanizer/Humanizer !) Humanizer shows up as a dependency of ASP.NET Core and roslyn-analyzers. This tries to fix that. Supposedly it also ships with the SDK. Fixes: dotnet#1767
- Loading branch information
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
patches/humanizer/0001-Fix-building-in-a-source-build-context.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
From a7a9cea5471babcf1055f1552f0946dda8927c40 Mon Sep 17 00:00:00 2001 | ||
From: Omair Majid <omajid@redhat.com> | ||
Date: Tue, 17 Nov 2020 13:14:19 -0500 | ||
Subject: [PATCH] Fix building in a source-build context | ||
|
||
The GitVersionTask is not compatible with .NET Core. So disable it and | ||
use an explicit PackageVersion. | ||
|
||
The NuGet feed points to something that returns an error for me. So just | ||
disable it for now. | ||
|
||
Disable SourceLink.Create.CommandLine since upstream is dead and we dont | ||
really need it for now. | ||
--- | ||
src/Humanizer/Humanizer.csproj | 5 ++--- | ||
src/NuGet.config | 5 ++++- | ||
2 files changed, 6 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/src/Humanizer/Humanizer.csproj b/src/Humanizer/Humanizer.csproj | ||
index 842a373..e018285 100644 | ||
--- a/src/Humanizer/Humanizer.csproj | ||
+++ b/src/Humanizer/Humanizer.csproj | ||
@@ -3,6 +3,7 @@ | ||
<TargetFramework>netstandard1.0</TargetFramework> | ||
<Authors>Mehdi Khalili, Oren Novotny</Authors> | ||
<PackageLicenseUrl>https://raw.githubusercontent.com/Humanizr/Humanizer/master/LICENSE</PackageLicenseUrl> | ||
+ <PackageVersion>2.2.0</PackageVersion> | ||
<PackageProjectUrl>https://github.com/Humanizr/Humanizer</PackageProjectUrl> | ||
<MinClientVersion>2.12</MinClientVersion> | ||
<Description>A micro-framework that turns your normal strings, type names, enum fields, date fields ETC into a human friendly format</Description> | ||
@@ -16,7 +17,5 @@ | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
- <PackageReference Include="GitVersionTask" Version="4.0.0-beta0011" PrivateAssets="All" /> | ||
- <PackageReference Include="SourceLink.Create.CommandLine" Version="2.1.1" PrivateAssets="All" /> | ||
</ItemGroup> | ||
-</Project> | ||
\ No newline at end of file | ||
+</Project> | ||
diff --git a/src/NuGet.config b/src/NuGet.config | ||
index be02089..2fb8ff3 100644 | ||
--- a/src/NuGet.config | ||
+++ b/src/NuGet.config | ||
@@ -1,7 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
+ <!-- | ||
+ This feed gives an error: Feed does not exist. | ||
<add key="CI Builds (Humanizer)" value="https://www.myget.org/F/humanizer/api/v3/index.json" /> | ||
+ --> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
-</configuration> | ||
\ No newline at end of file | ||
+</configuration> | ||
-- | ||
2.26.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<SourceDirectory>Humanizer</SourceDirectory> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<PropertyGroup> | ||
<PackagesOutput>$(ProjectDirectory)/src/Humanizer/bin/$(Configuration)</PackagesOutput> | ||
<RepoApiImplemented>false</RepoApiImplemented> | ||
<DeterministicBuildOptOut>true</DeterministicBuildOptOut> | ||
<NuGetConfigFile>$(ProjectDirectory)/src/NuGet.config</NuGetConfigFile> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<ItemGroup> | ||
<RepositoryReference Include="sourcelink" /> | ||
</ItemGroup> | ||
|
||
<Target Name="RepoBuild"> | ||
<PropertyGroup> | ||
<BuildCommandArgs>$(ProjectDirectory)/src/Humanizer/Humanizer.csproj</BuildCommandArgs> | ||
<BuildCommandArgs>$(BuildCommandArgs) /p:Configuration=$(Configuration)</BuildCommandArgs> | ||
<BuildCommandArgs>$(BuildCommandArgs) /v:$(LogVerbosity)</BuildCommandArgs> | ||
<BuildCommandArgs>$(BuildCommandArgs) $(RedirectRepoOutputToLog)</BuildCommandArgs> | ||
</PropertyGroup> | ||
|
||
<Exec Command="$(DotnetToolCommand) restore /bl:restore.binlog $(BuildCommandArgs) " | ||
EnvironmentVariables="@(EnvironmentVariables)" | ||
WorkingDirectory="$(ProjectDirectory)" | ||
IgnoreStandardErrorWarningFormat="true" /> | ||
|
||
<Exec Command="$(DotnetToolCommand) build /bl:build.binlog $(BuildCommandArgs)" | ||
EnvironmentVariables="@(EnvironmentVariables)" | ||
WorkingDirectory="$(ProjectDirectory)" | ||
IgnoreStandardErrorWarningFormat="true" /> | ||
|
||
<Exec Command="$(DotnetToolCommand) pack /bl:pack.binlog $(BuildCommandArgs)" | ||
EnvironmentVariables="@(EnvironmentVariables)" | ||
WorkingDirectory="$(ProjectDirectory)" | ||
IgnoreStandardErrorWarningFormat="true" /> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters