Skip to content

Commit c7012bc

Browse files
authored
Stabilize CLI. (#565)
* Stabilize CLI. * Use stable MSBuild. * Fix MSBuild version to match prodcon build. * Modify CLI build file to always ignore NU5104
1 parent 78246d4 commit c7012bc

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

repos/cli.proj

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
Unable to find package dotnet-watch.
9595
-->
9696
<EnvironmentVariables Include="CLIBUILD_SKIP_BUNDLEDDOTNETTOOLS=true" />
97+
98+
<!-- Produce stable versions for RTM only. When https://github.com/dotnet/source-build/issues/550
99+
is fixed we will be able to determine this automatically. -->
100+
<EnvironmentVariables Include="DropSuffix=true" />
97101
</ItemGroup>
98102

99103
<Target Name="AddProdConFeed" BeforeTargets="Build">
@@ -113,6 +117,28 @@
113117
Overwrite="true" />
114118
</Target>
115119

120+
<!--
121+
Ignore this error in the CLI build, which doesn't seem to happen in ProdCon:
122+
123+
error NU5104: A stable release of a package should not have a prerelease dependency. Either
124+
modify the version spec of dependency "NuGet.Frameworks [4.7.0-rtm.5156, )" or update the
125+
version field in the nuspec.
126+
-->
127+
<Target Name="AddNoWarnNU5104ByDefault" BeforeTargets="Build">
128+
<PropertyGroup>
129+
<BuildDefaultsFile>$(ProjectDirectory)build\BuildDefaults.props</BuildDefaultsFile>
130+
<ReplacementEndMark>&lt;/NoWarn&gt;</ReplacementEndMark>
131+
<InsertItemLine>;NU5104$(ReplacementEndMark)</InsertItemLine>
132+
133+
<BuildDefaultsPropsContents>$([System.IO.File]::ReadAllText('$(BuildDefaultsFile)'))</BuildDefaultsPropsContents>
134+
</PropertyGroup>
135+
136+
<WriteLinesToFile File="$(BuildDefaultsFile)"
137+
Lines="$(BuildDefaultsPropsContents.Replace('$(ReplacementEndMark)', '$(InsertItemLine)'))"
138+
Condition="! $(BuildDefaultsPropsContents.Contains('$(InsertItemLine)'))"
139+
Overwrite="true" />
140+
</Target>
141+
116142
<Target Name="CopyTarBall" AfterTargets="CopyPackage">
117143
<ItemGroup>
118144
<CliTarBalls Include="$(TarBallOutput)*$(TarBallExtension)" />

repos/msbuild.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- Override value from commit to match expected build. -->
77
<OfficialBuildId>20180426.1</OfficialBuildId>
88
<PackagesOutput>$(ProjectDirectory)/artifacts/$(Configuration)/packages</PackagesOutput>
9-
<OutputVersionArgs>/p:VersionPrefix=15.6.82 /p:DisableNerdbankVersioning=true /p:PreReleaseVersionLabel="rc" /p:BUILD_BUILDNUMBER=$(OfficialBuildId)</OutputVersionArgs>
9+
<OutputVersionArgs>/p:VersionPrefix=15.7.179 /p:DisableNerdbankVersioning=true /p:PreReleaseVersionLabel="" /p:BUILD_BUILDNUMBER=$(OfficialBuildId)</OutputVersionArgs>
1010
<BuildCommand>$(ProjectDirectory)build/build$(ShellExtension) build -DotNetBuildFromSource -DotNetCoreSdkDir $(DotNetCliToolDir) -bootstraponly -skiptests -pack -configuration $(Configuration) /p:GitHeadSha=$(GitCommitHash) $(OutputVersionArgs)</BuildCommand>
1111
<SourceOverrideRepoApiImplemented>true</SourceOverrideRepoApiImplemented>
1212
<RepoApiImplemented>false</RepoApiImplemented>

0 commit comments

Comments
 (0)