Skip to content

Commit

Permalink
Merge pull request #47 from DuendeSoftware/joe/pack-all
Browse files Browse the repository at this point in the history
Add a build target for convenient creation of local nuget packages
  • Loading branch information
josephdecock authored Nov 18, 2024
2 parents 642a906 + 52d2818 commit b352003
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflow-gen/workflow-gen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<RootNamespace>workflow_gen</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions access-token-management/samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="../../samples.props" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Duende.AccessTokenManagement</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
Expand Down
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This directory contains internal documentation for the foss repository, with notes on the
build process and tooling. See
[here](https://github.com/DuendeSoftware/docs.duendesoftware.com/) for user documentation.

## Topics
### NuGet
- [Local Packages](nuget/local.md)
27 changes: 27 additions & 0 deletions docs/nuget/local.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Building Packages Locally

You can build a package locally with `dotnet pack`. Run that from a project directory to
create a single package, or from the root of the repo to package everything in the
solution. The -o flag controls where the packages are output to.




## Consuming Local Packages
If you want to try out local builds of your packages, you can add a directory as a package
source to NuGet. To do so, add the feed to your NuGet.Config file. You can do this for
your entire user account or on a per-project basis. On windows, you personal config file
is located at %appdata%\NuGet\NuGet.Config. More details from Microsoft's docs
[here](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior).

```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="Local Builds" value="C:\packages" />
<!-- Other sources omitted -->
</packageSources>
</configuration>
```

You can also set this configuration via most IDEs.
4 changes: 4 additions & 0 deletions identity-model-oidc-client/clients/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="../../samples.props" />
</Project>
4 changes: 4 additions & 0 deletions identity-model-oidc-client/samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="../../samples.props" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<PublishTrimmed>true</PublishTrimmed>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>NU1507</NoWarn>
<NoWarn>$(NoWarn);NU1507</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
12 changes: 12 additions & 0 deletions samples.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<NoWarn>$(NoWarn);1591;NU1507</NoWarn>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
<!-- <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> -->
</PropertyGroup>

</Project>
4 changes: 2 additions & 2 deletions src.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<Copyright>Duende Software</Copyright>
<DebugType>full</DebugType>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<LangVersion>latest</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">True</ContinuousIntegrationBuild>
<Deterministic>true</Deterministic>
<NoWarn>CS1591,NU1507</NoWarn>
<NoWarn>$(NoWarn);CS1591,NU1507</NoWarn>
<IsTestProject>false</IsTestProject>
<IsPackable>true</IsPackable>
<IsTrimmable Condition="'$(TargetFramework)' != 'netstandard2.0'">true</IsTrimmable>
Expand Down
3 changes: 1 addition & 2 deletions test.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
<DebugType>full</DebugType>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<LangVersion>preview</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NoWarn>NU1507</NoWarn>
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit b352003

Please sign in to comment.