Skip to content

Commit

Permalink
Rename Stage0 build variables to PreviousStage
Browse files Browse the repository at this point in the history
  • Loading branch information
dsplaisted committed Aug 25, 2017
1 parent e4777c0 commit c6e4c8f
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj
<Import Project="build/FileExtensions.props" />
<Import Project="build/InputDirectories.props" />
<Import Project="build/MSBuildExtensions.props" />
<Import Project="build/Stage0.props" />
<Import Project="build/SetupPreviousStage.props" />
<Import Project="build/OutputDirectories.props" />
<Import Project="build/BuildDefaults.props" />
<Import Project="build/VersionBadge.props" />
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.DotNet.Cli.sln
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4
build\RestoreDependency.proj = build\RestoreDependency.proj
build\sdks\sdks.csproj = build\sdks\sdks.csproj
build\Signing.proj = build\Signing.proj
build\Stage0.props = build\Stage0.props
build\SetupPreviousStage.props = build\SetupPreviousStage.props
build\Test.targets = build\Test.targets
build\Version.props = build\Version.props
build\VersionBadge.props = build\VersionBadge.props
Expand Down
4 changes: 2 additions & 2 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
DependsOnTargets="MSBuildWorkaroundTarget;
RestoreDotnetCliBuildFramework">

<Exec Command="$(DotnetStage0) publish --no-restore -o $(DotnetCliBuildDirectory)/bin --framework $(CliTargetFramework) /p:GeneratePropsFile=$(GeneratePropsFile)"
<Exec Command="$(PreviousStageDotnet) publish --no-restore -o $(DotnetCliBuildDirectory)/bin --framework $(CliTargetFramework) /p:GeneratePropsFile=$(GeneratePropsFile)"
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
</Target>

Expand All @@ -39,7 +39,7 @@
<ExtraRestoreArgs Condition="'$(OS)' != 'Windows_NT'">$(ExtraRestoreArgs) --disable-parallel</ExtraRestoreArgs>
</PropertyGroup>

<Exec Command="$(DotnetStage0) restore $(ExtraRestoreArgs)"
<Exec Command="$(PreviousStageDotnet) restore $(ExtraRestoreArgs)"
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
</Target>

Expand Down
2 changes: 1 addition & 1 deletion build/BundledTemplates.proj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<Target Name="EnsureTemplateRestored"
Condition="!Exists('$(TemplateNuPkgPath)/$(TemplatePackageName.ToLower()).nuspec')">
<DotNetRestore ToolPath="$(Stage0Directory)"
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
AdditionalParameters="/p:TemplatePackageName=$(TemplatePackageName) /p:TemplatePackageVersion=$(TemplatePackageVersion)" />
</Target>
Expand Down
2 changes: 1 addition & 1 deletion build/MSBuildExtensions.targets
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
NuGetPackagesDir=$(NuGetPackagesDir);
DependencyPackageName=%(ExtensionPackageToRestore.Identity);
DependencyPackageVersion=%(ExtensionPackageToRestore.Version);
Stage0Directory=$(Stage0Directory)
PreviousStageDirectory=$(PreviousStageDirectory)
</Properties>
</ExtensionRestore>
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions build/Prepare.targets
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<CallTarget Targets="CleanSrcLockFiles" />

<DotNetRestore ToolPath="$(Stage0Directory)"
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
ProjectPath="&quot;%(RestoreSrcPackagesInput.FullPath)&quot;" />

</Target>
Expand All @@ -79,7 +79,7 @@

<CallTarget Targets="CleanToolsLockFiles" />

<DotNetRestore ToolPath="$(Stage0Directory)"
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
ProjectPath="&quot;%(RestoreToolsPackagesInput.FullPath)&quot;"
AdditionalParameters="/p:UsePortableLinuxSharedFramework=$(UsePortableLinuxSharedFramework)" />

Expand Down
2 changes: 1 addition & 1 deletion build/RestoreDependency.proj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<Target Name="EnsureDependencyRestored"
Condition="!Exists('$(DependencyNuPkgPath)/$(DependencyPackageName.ToLower()).nuspec')">
<DotNetRestore ToolPath="$(Stage0Directory)"
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
ProjectPath="$(MSBuildThisFileDirectory)/sdks/sdks.csproj"
AdditionalParameters="/p:DependencyPackageName=$(DependencyPackageName) /p:DependencyPackageVersion=$(DependencyPackageVersion)" />
</Target>
Expand Down
10 changes: 2 additions & 8 deletions build/Stage0.props → build/SetupPreviousStage.props
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
<Project>
<PropertyGroup Condition="'$(PreviousStageProps)' == ''">
<Stage0Directory>$(RepoRoot)/.dotnet_stage0/$(Architecture)</Stage0Directory>
<DotnetStage0>$(Stage0Directory)/dotnet$(ExeExtension)</DotnetStage0>
<PreviousStageDirectory>$(RepoRoot)/.dotnet_stage0/$(Architecture)</PreviousStageDirectory>
<PreviousStageDotnet>$(PreviousStageDirectory)/dotnet$(ExeExtension)</PreviousStageDotnet>
</PropertyGroup>

<Import Project="$(PreviousStageProps)" Condition="'$(PreviousStageProps)' != ''" />

<PropertyGroup Condition="'$(PreviousStageProps)' != ''">
<Stage0Directory>$(PreviousStageDirectory)</Stage0Directory>
<DotnetStage0>$(PreviousStageDotnet)</DotnetStage0>
</PropertyGroup>


<PropertyGroup>
<IsDesktopAvailable>False</IsDesktopAvailable>
Expand Down
4 changes: 2 additions & 2 deletions build/Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@

<Target Name="TestsForBuildItself">
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/test/MsBuildScript.Tests/runtests.target"
ToolPath="$(Stage0Directory)" />
ToolPath="$(PreviousStageDirectory)" />
</Target>

<Target Name="EnsureStageSeparation">
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj /p:OutputDirectory=&quot;$(OutputDirectory)&quot;"
ToolPath="$(Stage0Directory)" />
ToolPath="$(PreviousStageDirectory)" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions build/package/Installer.DEB.proj
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
Mode="u+x" />

<!-- Build SDK Deb package -->
<DotNetDebTool ToolPath="$(Stage0Directory)"
<DotNetDebTool ToolPath="$(PreviousStageDirectory)"
InputDirectory="$(LayoutDirectory)"
OutputDirectory="$(DotNetDebToolOutputDirectory)"
PackageName="$(SdkDebianPackageName)"
Expand Down Expand Up @@ -159,7 +159,7 @@
<Target Name="PrepareDotnetDebTool"
DependsOnTargets="WriteDotnetDebToolProject">

<DotNetRestore ToolPath="$(Stage0Directory)"
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
WorkingDirectory="$(DotnetDebToolDir)" />
</Target>

Expand Down
2 changes: 1 addition & 1 deletion build/package/Installer.MSI.targets
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@

<Exec Command ="powershell -NoProfile -NoLogo $(SdkTestMsiPowershellScript)
-InputMsi '$(SdkInstallerFile)'
-DotnetDir '$(Stage0Directory)'" />
-DotnetDir '$(PreviousStageDirectory)'" />

<WriteLinesToFile
File="$(SdkMsiTestedSentinel)"
Expand Down
4 changes: 2 additions & 2 deletions build/package/Nupkg.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<DotNetPack NoBuild="True"
Output="$(PackagesDirectory)"
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj"
ToolPath="$(Stage0Directory)"
ToolPath="$(PreviousStageDirectory)"
VersionSuffix="$(VersionSuffix)"
Configuration="$(Configuration)" />
</Target>
Expand All @@ -34,7 +34,7 @@

<MakeDir Directories="$(PackagingBuildBasePath)" />

<DotNetBuild ToolPath="$(Stage0Directory)"
<DotNetBuild ToolPath="$(PreviousStageDirectory)"
Configuration="$(Configuration)"
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj" />
</Target>
Expand Down
4 changes: 2 additions & 2 deletions build/prepare/CheckPrereqs.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
DependsOnTargets="CheckUbuntuAptGetDependencies;
CheckCentOsYumDependencies;">

<Message Text="Using Stage0 version:" />
<Exec Command="$(DotnetStage0) --version" />
<Message Text="Using previous stage version:" />
<Exec Command="$(PreviousStageDotnet) --version" />
</Target>

<Target Name="CheckUbuntuAptGetDependencies"
Expand Down
8 changes: 4 additions & 4 deletions src/redist/redist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@
<Target Name="PublishRoslyn"
BeforeTargets="Publish">

<DotNetPublish ToolPath="$(Stage0Directory)"
<DotNetPublish ToolPath="$(PreviousStageDirectory)"
Configuration="$(Configuration)"
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
</Target>

<Target Name="PublishFSharp"
BeforeTargets="Publish">

<DotNetPublish ToolPath="$(Stage0Directory)"
<DotNetPublish ToolPath="$(PreviousStageDirectory)"
Configuration="$(Configuration)"
ProjectPath="$(SrcDirectory)/tool_fsharp/tool_fsc.csproj" />
</Target>
Expand Down Expand Up @@ -159,7 +159,7 @@
SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity);
DependencyPackageName=%(BundledSdk.Identity);
DependencyPackageVersion=%(BundledSdk.Version);
Stage0Directory=$(Stage0Directory)
PreviousStageDirectory=$(PreviousStageDirectory)
</Properties>
</SdksToBundle>
</ItemGroup>
Expand All @@ -178,7 +178,7 @@
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
TemplatePackageName=%(BundledTemplate.Identity);
TemplatePackageVersion=%(BundledTemplate.Version);
Stage0Directory=$(Stage0Directory)
PreviousStageDirectory=$(PreviousStageDirectory)
</Properties>
</TemplatesToBundle>
</ItemGroup>
Expand Down

0 comments on commit c6e4c8f

Please sign in to comment.