'dotnet octo pack' multiple packages in one command (Octopus.DotNet.Cli)
The OctoPack project is great for Framework projects. We add the nuget dependency to select projects and add /p:RunOctoPack=true
to our build script. The build script does not need to be updated for every new, removed or renamed octo-packed project.
SDK projects are less automated. After building, we have to run dotnet publish
, then octo pack
for each project. It would be great to define 1 build script, then update the projects as needed to pack or not.
Idea to attain goal:
Add element
<IsOctoPackable>true</IsOctoPackable>
in csproj that works similar to IsPackable.Allow
dot net octo pack
to point to the csproj, multiple csproj, or the sln. Perform actions on any projects with IsOctoPack==true.Add option
--no-publish
(following--nobuild
and--no-restore
convention)Call
dotnet publish
(unless --no-publish was specified), passing on applicable parametersDerive
basePath
fromoutput/{projectName}
folder (publish will create a directory with the project name in the --output folder).Derive
id
from OctoPackageId (new csproj property), AssemblyName, or Project Name (AssemblyName is project name if missing).
