Skip to content

Commit 1a6038c

Browse files
authored
feat: Add noRestore option to docfx metadata command (#10428)
feat: add `noRestore` option to `docfx metadata` command
1 parent 1c07554 commit 1a6038c

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

docs/reference/docfx-cli-reference/docfx-metadata.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ Run `docfx metadata --help` or `docfx -h` to get a list of all available options
7777

7878
Disable the default API filter (default filter only generate public or protected APIs).
7979

80+
- **--noRestore**
81+
82+
Do not run `dotnet restore` before building the projects.
83+
8084
- **--namespaceLayout**
8185

8286
Determines the namespace layout in table of contents.

src/docfx/Models/MetadataCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ private static void MergeOptionsToConfig(MetadataCommandOptions options, DocfxCo
2727
item.ShouldSkipMarkup |= options.ShouldSkipMarkup;
2828
item.DisableGitFeatures |= options.DisableGitFeatures;
2929
item.DisableDefaultFilter |= options.DisableDefaultFilter;
30+
item.NoRestore |= options.NoRestore;
3031
item.CategoryLayout = options.CategoryLayout ?? item.CategoryLayout;
3132
item.NamespaceLayout = options.NamespaceLayout ?? item.NamespaceLayout;
3233
item.MemberLayout = options.MemberLayout ?? item.MemberLayout;

src/docfx/Models/MetadataCommandOptions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ internal class MetadataCommandOptions : LogOptions
4545
[CommandOption("--disableDefaultFilter")]
4646
public bool DisableDefaultFilter { get; set; }
4747

48+
[Description("Do not run `dotnet restore` before building the projects")]
49+
[CommandOption("--noRestore")]
50+
public bool NoRestore { get; set; }
51+
4852
[Description("Determines the category layout in table of contents.")]
4953
[CommandOption("--categoryLayout")]
5054
public CategoryLayout? CategoryLayout { get; set; }

0 commit comments

Comments
 (0)