Skip to content

Commit 39a7d6b

Browse files
codebrainrusscam
authored andcommitted
Generate docs when default target or gendocs passed (#3811)
This commit generates documentation when the default target is used or when gendocs is explicitly passed Closes #3674
1 parent 669b2c7 commit 39a7d6b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ environment:
66
DOTNET_CLI_TELEMETRY_OPTOUT: true
77
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
88
build_script:
9-
- cmd: build.bat canary skipdocs
9+
- cmd: build.bat canary
1010

1111
nuget:
1212
disable_publish_on_pr: true

azure-pipelines.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jobs:
33
pool:
44
vmImage: 'ubuntu-16.04'
55
steps:
6-
- script: ./build.sh test-one skipdocs
6+
- script: ./build.sh test-one
77
displayName: 'build and unit test'
88
- task: PublishTestResults@2
99
inputs:
@@ -15,7 +15,7 @@ jobs:
1515
pool:
1616
vmImage: 'vs2017-win2016'
1717
steps:
18-
- script: build.bat canary skipdocs
18+
- script: build.bat canary
1919
displayName: 'build and unit test'
2020
- task: PublishTestResults@2
2121
inputs:
@@ -33,7 +33,7 @@ jobs:
3333
latest:
3434
esVersion: 'latest'
3535
steps:
36-
- script: 'build.bat integrate-one $(esVersion) "readonly,writable,bool,xpack" skipdocs'
36+
- script: 'build.bat integrate-one $(esVersion) "readonly,writable,bool,xpack"'
3737
displayName: '$(esVersion) windows integration tests'
3838
- task: PublishTestResults@2
3939
condition: succeededOrFailed()
@@ -52,7 +52,7 @@ jobs:
5252
latest:
5353
esVersion: 'latest'
5454
steps:
55-
- script: './build.sh integrate-one $(esVersion) "readonly,writable" skipdocs'
55+
- script: './build.sh integrate-one $(esVersion) "readonly,writable"'
5656
displayName: '$(esVersion) linux integration tests'
5757
- task: PublishTestResults@2
5858
condition: succeededOrFailed()

build/scripts/Commandline.fs

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ NOTE: both the `test` and `integrate` targets can be suffixed with `-all` to for
4141
4242
Execution hints can be provided anywhere on the command line
4343
- skiptests : skip running tests as part of the target chain
44-
- skipdocs : skip generating documentation
44+
- gendocs : generate documentation
4545
- non-interactive : make targets that run in interactive mode by default to run unassisted.
4646
- docs:<B> : the branch name B to use when generating documentation
4747
- seed:<N> : provide a seed to run the tests with.
@@ -91,7 +91,7 @@ Execution hints can be provided anywhere on the command line
9191
type PassedArguments = {
9292
NonInteractive: bool;
9393
SkipTests: bool;
94-
SkipDocs: bool;
94+
GenDocs: bool;
9595
Seed: string;
9696
RandomArguments: string list;
9797
DocsBranch: string;
@@ -119,7 +119,7 @@ Execution hints can be provided anywhere on the command line
119119
args
120120
|> List.filter(fun x ->
121121
x <> "skiptests" &&
122-
x <> "skipdocs" &&
122+
x <> "gendocs" &&
123123
x <> "non-interactive" &&
124124
not (x.StartsWith("seed:")) &&
125125
not (x.StartsWith("random:")) &&
@@ -133,7 +133,7 @@ Execution hints can be provided anywhere on the command line
133133
let parsed = {
134134
NonInteractive = args |> List.exists (fun x -> x = "non-interactive")
135135
SkipTests = skipTests
136-
SkipDocs = args |> List.exists (fun x -> x = "skipdocs") || isMono
136+
GenDocs = (args |> List.exists (fun x -> x = "gendocs") || target = "build") && not isMono
137137
Seed =
138138
match args |> List.tryFind (fun x -> x.StartsWith("seed:")) with
139139
| Some t -> t.Replace("seed:", "")

build/scripts/Targets.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module Main =
5656

5757
conditional (not isMono) "internalize-dependencies" <| fun _ -> ShadowDependencies.ShadowDependencies artifactsVersion
5858

59-
conditional (not parsed.SkipDocs) "documentation" <| fun _ -> Documentation.Generate parsed
59+
conditional (parsed.GenDocs) "documentation" <| fun _ -> Documentation.Generate parsed
6060

6161
conditional (not parsed.SkipTests) "test" <| fun _ -> Tests.RunUnitTests parsed |> ignore
6262

0 commit comments

Comments
 (0)