Skip to content

Commit

Permalink
Misc project cleanup (#115)
Browse files Browse the repository at this point in the history
* Rename repos directory to repo-projects to align with VMR naming

* Remove unused RepoApiImplemented properties

* Remove unused RepositoryName override capability

* Cleanup netcorecli-fsc project

* Cleanup newtonsoft-json project

* remove DeterministicBuildOptOut property
  • Loading branch information
MichaelSimons authored Mar 10, 2023
1 parent 8fbead5 commit 57af468
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 46 deletions.
2 changes: 1 addition & 1 deletion eng/Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<ItemGroup>
<ProjectToBuild Include="$(RepoRoot)repos\*.proj" />
<ProjectToBuild Include="$(RepoRoot)repo-projects\*.proj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<RepositoryName Condition="'$(RepositoryName)' == ''">$(MSBuildProjectName)</RepositoryName>
<RepositoryName>$(MSBuildProjectName)</RepositoryName>
</PropertyGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
Expand Down Expand Up @@ -78,9 +78,7 @@
<EnvironmentVariables Include="GIT_COMMIT=$(GitCommitHash)" Condition="'$(GitCommitHash)' != ''" />
<EnvironmentVariables Include="RepositoryType=Git" />

<EnvironmentVariables Include="DeterministicSourcePaths=true" Condition="'$(DeterministicBuildOptOut)' != 'true'" />
<EnvironmentVariables Include="DeterministicSourcePaths=false" Condition="'$(DeterministicBuildOptOut)' == 'true'" />

<EnvironmentVariables Include="DeterministicSourcePaths=false" />
<EnvironmentVariables Include="SourceRoot=$(ProjectDirectory)" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
Outputs="$(RepoCompletedSemaphorePath)Build.complete">
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Building $(ProjectBuildReason)" />
<Message Importance="High" Text="Running command:" />
<Message Importance="High" Text=" $(BuildCommand) $(RepoApiArgs)" Condition="'$(BuildCommand)' != ''" />
<Message Importance="High" Text=" $(BuildCommand)" Condition="'$(BuildCommand)' != ''" />
<Message Importance="High" Text=" Using custom build target" Condition="'$(BuildCommand)' == ''" />
<Message Importance="High" Text=" Log: $(RepoConsoleLogFile)" />
<Message Importance="High" Text=" With Environment Variables:" />
Expand All @@ -109,8 +109,8 @@
<EnvironmentVariables Condition="'$(NUGET_PACKAGES)'!=''" Include="NUGET_PACKAGES=$(NUGET_PACKAGES)" />
</ItemGroup>
<PropertyGroup>
<FullCommand Condition="'$(LogVerbosityOptOut)' != 'true'">$(BuildCommand) /v:$(LogVerbosity) $(RepoApiArgs) $(RedirectRepoOutputToLog)</FullCommand>
<FullCommand Condition="'$(LogVerbosityOptOut)' == 'true'">$(BuildCommand) $(RepoApiArgs) $(RedirectRepoOutputToLog)</FullCommand>
<FullCommand Condition="'$(LogVerbosityOptOut)' != 'true'">$(BuildCommand) /v:$(LogVerbosity) $(RedirectRepoOutputToLog)</FullCommand>
<FullCommand Condition="'$(LogVerbosityOptOut)' == 'true'">$(BuildCommand) $(RedirectRepoOutputToLog)</FullCommand>
</PropertyGroup>
<Exec Command="$(FullCommand)"
WorkingDirectory="$(ProjectDirectory)"
Expand Down Expand Up @@ -154,7 +154,7 @@

<Target Name="CopyPackage"
AfterTargets="Package"
Condition="'$(OutputPlacementRepoApiImplemented)' != 'true' AND ('$(PackagesOutput)' != '' OR '@(PackagesOutputList)' != '')"
Condition="'$(PackagesOutput)' != '' OR '@(PackagesOutputList)' != ''"
DependsOnTargets="GatherBuiltPackages"
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)CopyPackage.complete">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

<PropertyGroup>
<PackagesOutput>$(ProjectDirectory)/src/MSBuildLocator/bin/$(Configuration)/</PackagesOutput>
<RepoApiImplemented>false</RepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
</PropertyGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

<PropertyGroup>
<PackagesOutput>$(ProjectDirectory)/bin/$(Configuration)</PackagesOutput>
<RepoApiImplemented>false</RepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

<PropertyGroup>
<PackagesOutput>$(ProjectDirectory)/pack</PackagesOutput>
<RepoApiImplemented>false</RepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
</PropertyGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
Expand Down
2 changes: 0 additions & 2 deletions repos/cssparser.proj → repo-projects/cssparser.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

<PropertyGroup>
<PackagesOutput>$(ProjectDirectory)/src/Microsoft.Css.Parser/bin/$(Configuration)/</PackagesOutput>
<RepoApiImplemented>false</RepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
</PropertyGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
Expand Down
2 changes: 0 additions & 2 deletions repos/humanizer.proj → repo-projects/humanizer.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

<PropertyGroup>
<PackagesOutput>$(ProjectDirectory)/src/Humanizer/bin/Release</PackagesOutput>
<RepoApiImplemented>false</RepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
<NuGetConfigFile>$(ProjectDirectory)/src/NuGet.config</NuGetConfigFile>
<HumanizerCorePackageVersion>2.14.1</HumanizerCorePackageVersion>
</PropertyGroup>
Expand Down
31 changes: 31 additions & 0 deletions repo-projects/netcorecli-fsc.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<OutputArgs>/bl</OutputArgs>
<OutputArgs>$(OutputArgs) /v:$(LogVerbosity)</OutputArgs>
<OutputArgs>$(OutputArgs) /p:OutputPath=$(OutputPath)$(RepositoryName)/</OutputArgs>
<OutputArgs>$(OutputArgs) /p:BaseIntermediateOutputPath=$(IntermediatePath)$(RepositoryName)</OutputArgs>
<OutputArgs>$(OutputArgs) $(RedirectRepoOutputToLog)</OutputArgs>

<BuildCommandArgs>pack</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) -c $(Configuration)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) --output $(SourceBuiltPackagesPath)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) --no-build FSharp.NET.Sdk.csproj</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:NuspecFile=FSharp.NET.Sdk.nuspec</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) $(OutputArgs)</BuildCommandArgs>
<BuildCommand>$(DotnetToolCommand) $(BuildCommandArgs)</BuildCommand>

<PackagesOutput>$(SourceBuiltPackagesPath)</PackagesOutput>
<ProjectDirectory>$(SubmoduleDirectory)$(RepositoryName)/</ProjectDirectory>
</PropertyGroup>

<Target Name="RepoRestore" BeforeTargets="Build" DependsOnTargets="UpdateNuGetConfig">
<Exec Command="$(DotnetToolCommand) restore FSharp.NET.Sdk.csproj $(OutputArgs)"
WorkingDirectory="$(ProjectDirectory)"
EnvironmentVariables="@(EnvironmentVariables)"
IgnoreStandardErrorWarningFormat="true" />
</Target>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
21 changes: 14 additions & 7 deletions repos/newtonsoft-json.proj → repo-projects/newtonsoft-json.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,24 @@
<NewtonsoftJsonKeyFilePath>$(KeysDir)Newtonsoft.Json.snk</NewtonsoftJsonKeyFilePath>
<NewtonsoftJsonDirectory>$(ProjectDirectory)/Src/Newtonsoft.Json/</NewtonsoftJsonDirectory>
<NewtonsoftJsonProjectPath>$(NewtonsoftJsonDirectory)Newtonsoft.Json.csproj</NewtonsoftJsonProjectPath>
<DotnetToolCommandArguments>"/p:DotnetOnly=true" "/p:Configuration=$(Configuration)" "/p:AssemblyOriginatorKeyFile=$(NewtonsoftJsonKeyFilePath)" "/p:SignAssembly=true" "/p:PublicSign=true" "/p:TreatWarningsAsErrors=false" "/p:AdditionalConstants=SIGNED"</DotnetToolCommandArguments>
<BuildCommand>$(DotnetToolCommand) build $(NewtonsoftJsonProjectPath) /bl:build.binlog $(DotnetToolCommandArguments)</BuildCommand>
<BuildPackagesCommand>$(DotnetToolCommand) pack $(NewtonsoftJsonProjectPath) /bl:pack.binlog $(DotnetToolCommandArguments)</BuildPackagesCommand>
<CleanCommand>$(DotnetToolCommand) clean $(NewtonsoftJsonProjectPath) $(DotnetToolCommandArguments)</CleanCommand>

<DotnetToolCommandArgs>/p:DotnetOnly=true</DotnetToolCommandArgs>
<DotnetToolCommandArgs>$(DotnetToolCommandArgs) /p:Configuration=$(Configuration)</DotnetToolCommandArgs>
<DotnetToolCommandArgs>$(DotnetToolCommandArgs) /p:AssemblyOriginatorKeyFile=$(NewtonsoftJsonKeyFilePath)</DotnetToolCommandArgs>
<DotnetToolCommandArgs>$(DotnetToolCommandArgs) /p:SignAssembly=true</DotnetToolCommandArgs>
<DotnetToolCommandArgs>$(DotnetToolCommandArgs) /p:PublicSign=true</DotnetToolCommandArgs>
<DotnetToolCommandArgs>$(DotnetToolCommandArgs) /p:TreatWarningsAsErrors=false</DotnetToolCommandArgs>
<DotnetToolCommandArgs>$(DotnetToolCommandArgs) /p:AdditionalConstants=SIGNED</DotnetToolCommandArgs>

<BuildCommand>$(DotnetToolCommand) build $(NewtonsoftJsonProjectPath) /bl:build.binlog $(DotnetToolCommandArgs)</BuildCommand>
<BuildPackagesCommand>$(DotnetToolCommand) pack $(NewtonsoftJsonProjectPath) /bl:pack.binlog $(DotnetToolCommandArgs)</BuildPackagesCommand>
<CleanCommand>$(DotnetToolCommand) clean $(NewtonsoftJsonProjectPath) $(DotnetToolCommandArgs)</CleanCommand>

<PackagesOutput>$(NewtonsoftJsonDirectory)bin/$(Configuration)/</PackagesOutput>
<RepoApiImplemented>false</RepoApiImplemented>
<DeterministicBuildOptOut>true</DeterministicBuildOptOut>
</PropertyGroup>

<Target Name="RepoRestore" BeforeTargets="Build" DependsOnTargets="UpdateNuGetConfig">
<Exec Command="$(DotnetToolCommand) restore $(NewtonsoftJsonProjectPath) $(DotnetToolCommandArguments) /v:$(LogVerbosity) /bl:restore.binlog $(RedirectRepoOutputToLog)"
<Exec Command="$(DotnetToolCommand) restore $(NewtonsoftJsonProjectPath) $(DotnetToolCommandArgs) /v:$(LogVerbosity) /bl:restore.binlog $(RedirectRepoOutputToLog)"
WorkingDirectory="$(ProjectDirectory)"
EnvironmentVariables="@(EnvironmentVariables)"
IgnoreStandardErrorWarningFormat="true" />
Expand Down
20 changes: 0 additions & 20 deletions repos/netcorecli-fsc.proj

This file was deleted.

0 comments on commit 57af468

Please sign in to comment.