-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add a build target for convenient creation of local nuget packages #47
base: main
Are you sure you want to change the base?
Conversation
Directory.Build.targets
Outdated
<Project> | ||
<PropertyGroup> | ||
<DuendePackageDir Condition=" '$(DuendePackageDir)' == '' ">$(MSBuildThisFileDirectory)packages</DuendePackageDir> | ||
</PropertyGroup> | ||
|
||
<Target Name="PackAndMove" Condition="'$(IsPackable)' == 'true'"> | ||
<Exec Command="dotnet pack --configuration Release --output $(DuendePackageDir)" /> | ||
</Target> | ||
|
||
</Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet pack -o <OutputDir>
, dotnet pack -o $env:PACKAGES_PATH
at solution level should be sufficient I'd say so don't think we need a custom build target.
@@ -0,0 +1,52 @@ | |||
# Building Packages Locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Directory.Build.targets
is removed, can remove this.
Was just thinking if we even need to mention how to build in the readme... it's all standard dotnet
CLI after all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think we need the custom build target.
The rest of the clean up in the PR (samples.props
etc) is 👍🏻
This PR creates a PackAndMove target that packages our libraries locally and moves them to a shared location. This is much more convenient than dealing with a whole bunch of nested subdirectories like
\identity-model\src\IdentityModel\bin\Debug\
, both for checking details of the output file and for consuming local builds of packages for testing.Each package can individually be packed and moved, or you can just run the target from the root of the repo and package everything. To ensure that we only package the right things, we respect the property, and there's a bit of cleanup in this PR to make sure IsPackable is set correctly everywhere. There's a new samples.props file to turn it off for sample and client projects.
You can either use the default /packages directory within the repo as the destination, or specify it via environment variable or command line arg.
This PR also creates a docs directory within the foss repo as a home for internal documentation. The first page of that internal doc is a description of this target. I've recently been experimenting with different possible homes for developer docs, and I think I prefer this over anything else, because it co-locates everything - this one PR contains both the new tooling and the documentation for that new tooling.