Skip to content

Commit fea5445

Browse files
authored
[WIP] Feature/master/restructure (#4295)
* move test projects to root * update sln/csproj references * move nested src folders * IsTestProject on other test projects * Move ExamplesGenerator * Move Examples to temp folder * remove unused directory build props * move examples to tests folder * add src folder and rename virtualized cluster * add moved csproj to sln * move code generation over to latest buildalyzer so we filter projects again * fix build * simplify our props and targets files * started on moving scripts over * move nuget metadata over to csproj * remove nuspec files * remove unused paket.references * allow tests to be run through dotnet test test/tests.proj * update solution * started on updating scripts * update test logger * update tests scripts * update failing examples test * stage * DocGenerator should not load itself * update nuget pack * update canary build * update canary build * simplified differ * started on rewriting during validate * move shadowdeps lower in compile chain * build canary now builds versioned packages again * Remove projects.fsx * centralized calling repos tooling and made sure dotnet restore is called and only once * repoint azure-pipeline publish tests step to new trx output locations * --no-build on dotnet test * add covecoverage to azure pipelines * update pipeline step names * clean up targets * global.json should be 8.0.0 * RELEASE => Release, --no-build uncovered this one * quotes around reporttypes * Command line in charge of trx and cobertura exports * Dockerfile updated
1 parent 1fb218f commit fea5445

File tree

2,330 files changed

+1223
-2201
lines changed

Some content is hidden

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

2,330 files changed

+1223
-2201
lines changed

.ci/DockerFile

+12-11
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,30 @@ FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} AS elasticsearch-net-bu
33

44
WORKDIR /sln
55

6-
COPY ./*.sln ./nuget.config ./
7-
COPY ./src/*.sln ./src/
6+
COPY ./*.sln ./nuget.config ./*.Build.props ./*.Build.targets ./
87

98
# todo standardize on Build.props as Directory.Build.props needs that form
10-
COPY ./src/*.Build.props ./src/*.build.props ./src/
11-
12-
# consider flattening our repos to just projects under ./src and ./test
9+
COPY ./src/*.Build.props ./src/
10+
COPY ./tests/*.Build.props ./tests/
1311

1412
# Copy the main source project files
1513
COPY src/*/*.?sproj ./src/
16-
COPY src/Tests/*/*.?sproj ./src/Tests/
17-
COPY src/Auxiliary/*/*.?sproj ./src/Auxiliary/
18-
COPY src/CodeGeneration/*/*.?sproj ./src/CodeGeneration/
19-
COPY src/Examples/*/*.?sproj ./src/Examples/
14+
COPY tests/*/*.?sproj ./tests/
2015

2116
# this puts the project files back into original location since COPY flattens
17+
RUN for file in $(find . -name "*.?sproj"); do echo mkdir -p $(dirname $file)/$(basename ${file%.*})/ && echo mv $file $(dirname $file)/$(basename ${file%.*})/; done
2218
RUN for file in $(find . -name "*.?sproj"); do mkdir -p $(dirname $file)/$(basename ${file%.*})/ && mv $file $(dirname $file)/$(basename ${file%.*})/; done
2319

24-
# copy these manually since these do not follow a pattern under src
20+
# copy these manually since these do not follow a pattern under src or tests
2521
COPY build/scripts/scripts.fsproj ./build/scripts/
2622
COPY .ci/Jenkins.csproj ./.ci/
2723

28-
RUN dotnet restore src/Elasticsearch.sln
24+
RUN ls -al
25+
RUN ls -al tests
26+
RUN ls -al src
27+
RUN ls -al src/Elasticsearch.Net
28+
29+
RUN dotnet restore
2930

3031
# Install app dependencies
3132

Directory.Build.props

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<Project>
2+
<!-- Default Version numbers -->
3+
<PropertyGroup>
4+
<CurrentVersion>7.0.0</CurrentVersion>
5+
<CurrentAssemblyVersion>7.0.0</CurrentAssemblyVersion>
6+
<CurrentAssemblyFileVersion>7.0.0</CurrentAssemblyFileVersion>
7+
<!-- Version and Informational reflect actual version -->
8+
<Version>$(CurrentVersion)</Version>
9+
<InformationalVersion>$(CurrentVersion)</InformationalVersion>
10+
<!-- Assembly version is sticky to MAJOR.0.0.0 to avoid binding redirects because we strong name our assemblies -->
11+
<AssemblyVersion>$(CurrentAssemblyVersion)</AssemblyVersion>
12+
<!-- File version reflects actual version number without prelease since that not allowed in its struct -->
13+
<FileVersion>$(CurrentAssemblyFileVersion)</FileVersion>
14+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
15+
<MajorVersion>$(Version.Split('.')[0])</MajorVersion>
16+
</PropertyGroup>
17+
<!-- Common Nuget metadata-->
18+
<PropertyGroup>
19+
<Authors>Elastic and contributors</Authors>
20+
<Copyright>Elasticsearch BV</Copyright>
21+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
22+
<PackageReleaseNotes>See https://github.com/elastic/elasticsearch-net/releases</PackageReleaseNotes>
23+
<PackageProjectUrl>https://github.com/elastic/elasticsearch-net</PackageProjectUrl>
24+
<PackageIconUrl>https://raw.githubusercontent.com/elastic/elasticsearch-net/master/build/nuget-icon.png</PackageIconUrl>
25+
</PropertyGroup>
26+
<PropertyGroup>
27+
<LangVersion>latest</LangVersion>
28+
<!-- Default Version numbers -->
29+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
30+
<IsPackable>false</IsPackable>
31+
32+
<OutputPath Condition="'$(OutputPathBaseDir)' != ''">$(OutputPathBaseDir)\$(MSBuildProjectName)\</OutputPath>
33+
<SolutionRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.bat))</SolutionRoot>
34+
35+
<DefineConstants Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='net472'">$(DefineConstants);FULLFRAMEWORK</DefineConstants>
36+
<DefineConstants Condition="$(DefineConstants.Contains(FULLFRAMEWORK)) == False">$(DefineConstants);DOTNETCORE</DefineConstants>
37+
38+
<ExposedPublicKey>002400000480000094000000060200000024000052534131000400000100010025d3a22bf3781ba85067374ad832dfcba3c4fa8dd89227e36121ba17b2c33ad6b6ce03e45e562050a031e2ff7fe12cff9060a50acbc6a0eef9ef32dc258d90f874b2e76b581938071ccc4b4d98204d1d6ca7a1988d7a211f9fc98efd808cf85f61675b11007d0eb0461dc86a968d6af8ebba7e6b540303b54f1c1f5325c252be</ExposedPublicKey>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<PackageReference Condition="'$(OS)' != 'Windows_NT' and $(DefineConstants.Contains(FULLFRAMEWORK))" Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0-preview.2"/>
42+
</ItemGroup>
43+
44+
</Project>

Directory.Build.targets

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<Project>
2+
<Import Project="$(SolutionRoot)\src\_PublishArtifacts.Build.props" Condition="$(IsPackable) == True"/>
3+
<PropertyGroup Condition="$(IsPackable) == True OR $(MSBuildProjectName.StartsWith('Tests'))">
4+
<SignAssembly>true</SignAssembly>
5+
<AssemblyOriginatorKeyFile>$(SolutionRoot)\build\keys\keypair.snk</AssemblyOriginatorKeyFile>
6+
</PropertyGroup>
7+
<PropertyGroup Condition="$(IsPackable) == True">
8+
9+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10+
<NoWarn>1591,1572,1571,1573,1587,1570,NU5048,</NoWarn>
11+
<Prefer32Bit>false</Prefer32Bit>
12+
<DebugSymbols>true</DebugSymbols>
13+
<DebugType>portable</DebugType>
14+
15+
<!-- we need to referenced assemblies during the command line build so that ILRepack can pick them up -->
16+
<CopyLocalLockFileAssemblies Condition="'$(TargetFramework)'=='netstandard2.0'">true</CopyLocalLockFileAssemblies>
17+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
18+
</PropertyGroup>
19+
20+
<Target Name="AssemblyInfos"
21+
BeforeTargets="CoreGenerateAssemblyInfo"
22+
Inputs="@InternalsVisibleTo" Outputs="%(InternalsVisibleTo.Identity)"
23+
Condition="$(IsPackable) == True"
24+
>
25+
<PropertyGroup>
26+
<ExposedAssembly>%(InternalsVisibleTo.Identity)</ExposedAssembly>
27+
<VersionNamespaced>$(ExposedAssembly.Replace("Nest","Nest$(MajorVersion)").Replace("Elasticsearch.Net","Elasticsearch.Net$(MajorVersion
28+
)"))</VersionNamespaced>
29+
</PropertyGroup>
30+
<ItemGroup>
31+
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
32+
<_Parameter1>%(InternalsVisibleTo.Identity), PublicKey=$(ExposedPublicKey)</_Parameter1>
33+
</AssemblyAttribute>
34+
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
35+
<_Parameter1>$(VersionNamespaced), PublicKey=$(ExposedPublicKey)</_Parameter1>
36+
</AssemblyAttribute>
37+
</ItemGroup>
38+
</Target>
39+
40+
</Project>

0 commit comments

Comments
 (0)