Skip to content

Commit aa9b9ee

Browse files
committed
IncludeInUpdate should use ContentProbability
1 parent d98b621 commit aa9b9ee

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

actions/publish/action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ runs:
1616
- id: repo-basename
1717
shell: bash
1818
run: 'echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT'
19-
- name: Setup Pages
20-
id: pages
21-
uses: actions/[email protected]
2219
- name: Build documentation
2320
uses: elastic/docs-builder@main
2421
with:
2522
prefix: '${{ steps.repo-basename.outputs.value }}'
23+
- name: Setup Pages
24+
id: pages
25+
uses: actions/[email protected]
26+
- name: List Documentation
27+
shell: bash
28+
run: 'ls .artifacts/docs/html'
2629
- name: Upload artifact
2730
uses: actions/[email protected]
2831
with:
2932
path: .artifacts/docs/html
30-
3133
- name: Deploy artifact
3234
id: deployment
3335
uses: actions/[email protected]

src/docs-generator/Cli/Commands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private void WriteMarkdownFile(DirectoryInfo directoryInfo, MarkdownFile markdow
148148
}
149149
}
150150

151-
void LoadStateFromFile(FileInfo fileInfo, bool? clear, ref int? seedFs, ref bool cleanOutput)
151+
private void LoadStateFromFile(FileInfo fileInfo, bool? clear, ref int? seedFs, ref bool cleanOutput)
152152
{
153153
if (!fileInfo.Exists) return;
154154
var state = File.ReadAllText(fileInfo.FullName).Split("|");

src/docs-generator/Domain/Determinism.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public Determinism(int? seedFileSystem, int? seedContent)
1616
FileSystem = new Randomizer(SeedFileSystem);
1717
Contents = new Randomizer(SeedContent);
1818

19-
SectionProbability = Contents.Float(0.001f, Contents.Float(0.1f));
19+
ContentProbability = Contents.Float(0.001f, Contents.Float(0.1f));
2020
FileProbability = FileSystem.Float(0.001f, Contents.Float(0.1f));
2121
}
2222

@@ -27,7 +27,7 @@ public Determinism(int? seedFileSystem, int? seedContent)
2727
public Randomizer FileSystem { get; }
2828
public Randomizer Contents { get; }
2929

30-
public float SectionProbability { get; }
30+
public float ContentProbability { get; }
3131
public float FileProbability { get; }
3232

3333
public static Determinism Random { get; set; } = new(null, null);

src/docs-generator/Domain/Generators.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static Generators()
2727
.Ignore(p => p.Links)
2828
.Ignore(p => p.Directory)
2929
.RuleFor(p => p.FileName, f => f.System.FileName("md"))
30-
.RuleFor(p => p.IncludeInUpdate, f => f.Random.Float() <= Determinism.Random.FileProbability)
30+
.RuleFor(p => p.IncludeInUpdate, f => f.Random.Float() <= Determinism.Random.ContentProbability)
3131
.RuleFor(p => p.Sections, f => Section.Generate(Determinism.Random.Contents.Number(1, 12)).ToArray());
3232
}
3333

0 commit comments

Comments
 (0)