Skip to content

Commit 23b8840

Browse files
authored
Regroup projects in solution by type (#1203)
* Group projects by type in solution * lambda can just depend on Elastic.Documentation * move refactor to src/authoring more to come later * update build automation paths * update github workflow paths to tooling * dotnet format * update paths for embedded content in yaml * update docs
1 parent d160752 commit 23b8840

File tree

77 files changed

+65
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+65
-68
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: ./.github/actions/bootstrap
2525

2626
- name: Build
27-
run: dotnet run --project src/docs-assembler -c release -- navigation validate
27+
run: dotnet run --project src/tooling/docs-assembler -c release -- navigation validate
2828

2929
build-lambda:
3030
runs-on: ubuntu-latest

.github/workflows/preview-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
- name: Build documentation
140140
if: github.repository == 'elastic/docs-builder' && steps.deployment.outputs.result
141141
run: |
142-
dotnet run --project src/docs-builder -- --strict --path-prefix "${PATH_PREFIX}"
142+
dotnet run --project src/tooling/docs-builder -- --strict --path-prefix "${PATH_PREFIX}"
143143
144144
- name: Build documentation
145145
if: github.repository != 'elastic/docs-builder' && (steps.deployment.outputs.result || (steps.check-files.outputs.any_modified == 'true' && github.event_name == 'merge_group'))

.github/workflows/smoke-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Build documentation
3636
id: docs-build
3737
run: |
38-
dotnet run --project src/docs-builder -- --strict --path-prefix "/docs" -p test-repo
38+
dotnet run --project src/tooling/docs-builder -- --strict --path-prefix "/docs" -p test-repo
3939
4040
- name: Verify landing-page-path output
4141
run: test ${{ steps.docs-build.outputs.landing-page-path }} == ${{ matrix.landing-page-path-output }}

build/CommandLine.fs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ type Build =
2828
| [<CliPrefix(CliPrefix.None);Hidden;SubCommand>] PublishContainers
2929
| [<CliPrefix(CliPrefix.None);Hidden;SubCommand>] PublishZip
3030

31-
| [<CliPrefix(CliPrefix.None);SubCommand>] ReleaseNotes
3231
| [<CliPrefix(CliPrefix.None);SubCommand>] Release
3332

3433
| [<Inherit;AltCommandLine("-s")>] Single_Target
@@ -57,8 +56,7 @@ with
5756
| PublishContainers
5857
| PublishZip
5958
| ValidateLicenses
60-
| ReleaseNotes
61-
| Compile
59+
| Compile
6260

6361
// flags
6462
| Single_Target -> "Runs the provided sub command without running their dependencies"

build/Targets.fs

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
module Targets
66

77
open Argu
8-
open System.IO
98
open CommandLine
109
open Fake.Core
1110
open Fake.IO
@@ -57,12 +56,12 @@ let private pristineCheck (arguments:ParseResults<Build>) =
5756
| _ -> failwithf "There are dotnet formatting violations. Call `dotnet format` to fix or specify -c to ./build.sh to skip this check"
5857

5958
let private publishBinaries _ =
60-
exec { run "dotnet" "publish" "src/docs-builder/docs-builder.csproj" }
61-
exec { run "dotnet" "publish" "src/docs-assembler/docs-assembler.csproj" }
59+
exec { run "dotnet" "publish" "src/tooling/docs-builder/docs-builder.csproj" }
60+
exec { run "dotnet" "publish" "src/tooling/docs-assembler/docs-assembler.csproj" }
6261

6362
let private publishZip _ =
6463
let zip tool =
65-
exec { run "dotnet" "publish" $"src/{tool}/{tool}.csproj" }
64+
exec { run "dotnet" "publish" $"src/tooling/{tool}/{tool}.csproj" }
6665
let binary = match OS.Current with Windows -> $"{tool}.exe" | _ -> tool
6766
Zip.zip
6867
$".artifacts/publish/{tool}/release"
@@ -89,7 +88,7 @@ let private publishContainers _ =
8988
}
9089
match exitCode with | 0 -> "edge;latest" | _ -> "edge"
9190
let args =
92-
["publish"; $"src/%s{project}/%s{project}.csproj"]
91+
["publish"; $"src/tooling/%s{project}/%s{project}.csproj"]
9392
@ [
9493
"/t:PublishContainer";
9594
"-p"; "DebugType=none";
@@ -122,27 +121,6 @@ let private validateLicenses _ =
122121
"--packages-filter"; "#System\..*#";]
123122
exec { run "dotnet" (["dotnet-project-licenses"] @ args) }
124123

125-
let private generateReleaseNotes (arguments:ParseResults<Build>) =
126-
let currentVersion = Software.Version.NormalizeToShorter()
127-
let releaseNotesPath = Paths.ArtifactPath "release-notes"
128-
let output =
129-
Paths.RelativePathToRoot <| Path.Combine(releaseNotesPath.FullName, $"release-notes-%s{currentVersion}.md")
130-
let tokenArgs =
131-
match arguments.TryGetResult Token with
132-
| None -> []
133-
| Some token -> ["--token"; token;]
134-
let releaseNotesArgs =
135-
(Software.GithubMoniker.Split("/") |> Seq.toList)
136-
@ ["--version"; currentVersion
137-
"--label"; "enhancement"; "Features"
138-
"--label"; "bug"; "Fixes"
139-
"--label"; "documentation"; "Documentation"
140-
] @ tokenArgs
141-
@ ["--output"; output]
142-
143-
let args = ["release-notes"] @ releaseNotesArgs
144-
exec { run "dotnet" args }
145-
146124
let Setup (parsed:ParseResults<Build>) =
147125
let wireCommandLine (t: Build) =
148126
match t with
@@ -159,7 +137,7 @@ let Setup (parsed:ParseResults<Build>) =
159137
| Release ->
160138
Build.Cmd
161139
[PristineCheck; Build]
162-
[ValidateLicenses; ReleaseNotes]
140+
[ValidateLicenses;]
163141
release
164142

165143
| Publish ->
@@ -178,7 +156,6 @@ let Setup (parsed:ParseResults<Build>) =
178156
| PublishContainers -> Build.Step publishContainers
179157
| PublishZip -> Build.Step publishZip
180158
| ValidateLicenses -> Build.Step validateLicenses
181-
| ReleaseNotes -> Build.Step generateReleaseNotes
182159

183160
// flags
184161
| Single_Target

docs-builder.sln

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BE6011CC-120
2020
src\Directory.Build.props = src\Directory.Build.props
2121
EndProjectSection
2222
EndProject
23-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docs-builder", "src\docs-builder\docs-builder.csproj", "{01F05AD0-E0E0-401F-A7EC-905928E1E9F0}"
23+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docs-builder", "src\tooling\docs-builder\docs-builder.csproj", "{01F05AD0-E0E0-401F-A7EC-905928E1E9F0}"
2424
EndProject
2525
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = ".github", ".github\.github.csproj", "{1A8659C1-222A-4824-B562-ED8F88658C05}"
2626
EndProject
@@ -43,18 +43,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "publish-vercel", "publish-v
4343
EndProject
4444
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "build", "build\build.fsproj", "{10857974-6CF1-42B5-B793-AAA988BD7348}"
4545
EndProject
46-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docs-assembler", "src\docs-assembler\docs-assembler.csproj", "{28350800-B44B-479B-86E2-1D39E321C0B4}"
46+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docs-assembler", "src\tooling\docs-assembler\docs-assembler.csproj", "{28350800-B44B-479B-86E2-1D39E321C0B4}"
4747
EndProject
4848
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "authoring", "tests\authoring\authoring.fsproj", "{018F959E-824B-4664-B345-066784478D24}"
4949
EndProject
50-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Markdown.Refactor", "src\Elastic.Markdown.Refactor\Elastic.Markdown.Refactor.csproj", "{7D36DDDA-9E0B-4D2C-8033-5D62FF8B6166}"
50+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Refactor", "src\authoring\Elastic.Documentation.Refactor\Elastic.Documentation.Refactor.csproj", "{7D36DDDA-9E0B-4D2C-8033-5D62FF8B6166}"
5151
EndProject
5252
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assembler", "assembler", "{CFEE9FAD-9E0C-4C0E-A0C2-B97D594C14B5}"
5353
ProjectSection(SolutionItems) = preProject
5454
actions\assembler\action.yml = actions\assembler\action.yml
5555
EndProjectSection
5656
EndProject
57-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Tooling", "src\Elastic.Documentation.Tooling\Elastic.Documentation.Tooling.csproj", "{4CCE599A-B9FE-4DF2-8763-34CF0A99D4AA}"
57+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Tooling", "src\tooling\Elastic.Documentation.Tooling\Elastic.Documentation.Tooling.csproj", "{4CCE599A-B9FE-4DF2-8763-34CF0A99D4AA}"
5858
EndProject
5959
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "validate-inbound-local", "validate-inbound-local", "{6E2ED6CC-AFC1-4E58-965D-6AEC500EBB46}"
6060
ProjectSection(SolutionItems) = preProject
@@ -78,10 +78,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "validate-path-prefixes-loca
7878
actions\validate-path-prefixes-local\action.yml = actions\validate-path-prefixes-local\action.yml
7979
EndProjectSection
8080
EndProject
81-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation", "Elastic.Documentation\Elastic.Documentation.csproj", "{09CE30F6-013A-49ED-B3D6-60AFA84682AC}"
81+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation", "src\Elastic.Documentation\Elastic.Documentation.csproj", "{09CE30F6-013A-49ED-B3D6-60AFA84682AC}"
8282
EndProject
8383
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Documentation.Configuration", "src\Elastic.Documentation.Configuration\Elastic.Documentation.Configuration.csproj", "{CD94F9E4-7FCD-4152-81F1-4288C6B75367}"
8484
EndProject
85+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tooling", "tooling", "{73ABAE37-118F-4A53-BC2C-F19333555C90}"
86+
ProjectSection(SolutionItems) = preProject
87+
src\tooling\Directory.Build.props = src\tooling\Directory.Build.props
88+
EndProjectSection
89+
EndProject
90+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "authoring", "authoring", "{059E787F-85C1-43BE-9DD6-CE319E106383}"
91+
EndProject
8592
Global
8693
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8794
Debug|Any CPU = Debug|Any CPU
@@ -146,15 +153,11 @@ Global
146153
EndGlobalSection
147154
GlobalSection(NestedProjects) = preSolution
148155
{4D198E25-C211-41DC-9E84-B15E89BD7048} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
149-
{01F05AD0-E0E0-401F-A7EC-905928E1E9F0} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
150156
{B27C5107-128B-465A-B8F8-8985399E4CFB} = {67B576EE-02FA-4F9B-94BC-3630BC09ECE5}
151157
{CD2887E3-BDA9-434B-A5BF-9ED38DE20332} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
152158
{A2A34BBC-CB5E-4100-9529-A12B6ECB769C} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
153-
{28350800-B44B-479B-86E2-1D39E321C0B4} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
154159
{018F959E-824B-4664-B345-066784478D24} = {67B576EE-02FA-4F9B-94BC-3630BC09ECE5}
155-
{7D36DDDA-9E0B-4D2C-8033-5D62FF8B6166} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
156160
{CFEE9FAD-9E0C-4C0E-A0C2-B97D594C14B5} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
157-
{4CCE599A-B9FE-4DF2-8763-34CF0A99D4AA} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
158161
{6E2ED6CC-AFC1-4E58-965D-6AEC500EBB46} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
159162
{6554F917-73CE-4B3D-9101-F28EAA762C6B} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
160163
{CDC0ECF4-6597-4FBA-8D25-5C244F0877E3} = {67B576EE-02FA-4F9B-94BC-3630BC09ECE5}
@@ -163,5 +166,11 @@ Global
163166
{BB789671-B262-43DD-91DB-39F9186B8257} = {245023D2-D3CA-47B9-831D-DAB91A2FFDC7}
164167
{09CE30F6-013A-49ED-B3D6-60AFA84682AC} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
165168
{CD94F9E4-7FCD-4152-81F1-4288C6B75367} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
169+
{73ABAE37-118F-4A53-BC2C-F19333555C90} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
170+
{28350800-B44B-479B-86E2-1D39E321C0B4} = {73ABAE37-118F-4A53-BC2C-F19333555C90}
171+
{01F05AD0-E0E0-401F-A7EC-905928E1E9F0} = {73ABAE37-118F-4A53-BC2C-F19333555C90}
172+
{4CCE599A-B9FE-4DF2-8763-34CF0A99D4AA} = {73ABAE37-118F-4A53-BC2C-F19333555C90}
173+
{059E787F-85C1-43BE-9DD6-CE319E106383} = {BE6011CC-1200-4957-B01F-FCCA10C5CF5A}
174+
{7D36DDDA-9E0B-4D2C-8033-5D62FF8B6166} = {059E787F-85C1-43BE-9DD6-CE319E106383}
166175
EndGlobalSection
167176
EndGlobal

docs/configure/site/index.md

Lines changed: 2 additions & 2 deletions

src/Directory.Build.props

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,4 @@
1010
<!-- TODO ENABLE to document our code properly <GenerateDocumentationFile>true</GenerateDocumentationFile> -->
1111
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1212
</PropertyGroup>
13-
14-
<ItemGroup>
15-
<Content Include="$(SolutionRoot)\build\nuget-icon.png" Pack="True" Link="nuget-icon.png" PackagePath="nuget-icon.png" CopyToOutputDirectory="PreserveNewest" />
16-
<Content Include="$(SolutionRoot)\LICENSE.txt" Pack="True" PackagePath="LICENSE.txt" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
17-
<Content Include="$(SolutionRoot)\NOTICE.txt" Pack="True" PackagePath="NOTICE.txt" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest"/>
18-
</ItemGroup>
19-
2013
</Project>

src/Elastic.Documentation.Configuration/Elastic.Documentation.Configuration.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<ProjectReference Include="..\..\Elastic.Documentation\Elastic.Documentation.csproj"/>
10+
<ProjectReference Include="..\Elastic.Documentation\Elastic.Documentation.csproj"/>
1111
</ItemGroup>
1212

1313
<ItemGroup>

0 commit comments

Comments
 (0)