Skip to content

Commit 333e7c0

Browse files
authored
Less verbose tarball build, avoid CLI first-run init during clean.sh (#818)
* Copy dotnet env vars from build scripts to clean Avoid doing first-time initialization during clean script execution. * Less verbose tarball build, add logging to clarify Reduce tarball build console verbosity to default. Previously, the verbosity was one way to determine whether you're in the middle of a tarball build or a tarball production build, so compensate by adding a note in the Build target messages. While making changes nearby, fix the 'Enivornment Varibles' typo.
1 parent fc82cc4 commit 333e7c0

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

clean.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ if [%1] == [-a] (
99
)
1010

1111
if EXIST "%~dp0Tools\dotnetcli\dotnet.exe" (
12+
set DOTNET_CLI_TELEMETRY_OPTOUT=1
13+
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
14+
set DOTNET_MULTILEVEL_LOOKUP=0
1215
"%~dp0Tools\dotnetcli\dotnet.exe" msbuild "%~dp0build.proj" -t:Clean
1316
exit /b %ERRORLEVEL%
1417
)

clean.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ fi
1414
SCRIPT_ROOT="$(cd -P "$( dirname "$0" )" && pwd)"
1515

1616
if [ -e "$SCRIPT_ROOT/Tools/dotnetcli/dotnet" ]; then
17+
export DOTNET_CLI_TELEMETRY_OPTOUT=1
18+
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
19+
export DOTNET_MULTILEVEL_LOOKUP=0
1720
"$SCRIPT_ROOT/Tools/dotnetcli/dotnet" msbuild "$SCRIPT_ROOT/build.proj" -t:Clean
1821
exit $?
1922
fi

repos/dir.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@
3535
<OrchestratedManifestBuildName Condition="'$(OrchestratedManifestBuildName)' == ''">$(RepositoryName)</OrchestratedManifestBuildName>
3636
</PropertyGroup>
3737

38+
<!-- A human-readable description of what's building and why. -->
39+
<PropertyGroup>
40+
<ProjectBuildReason>'$(RepositoryName)'</ProjectBuildReason>
41+
<ProjectBuildReason Condition="'$(OfflineBuild)' != 'true' AND '$(ArchiveDownloadedPackages)' == 'true'">$(ProjectBuildReason) to produce tarball</ProjectBuildReason>
42+
<ProjectBuildReason Condition="'$(OfflineBuild)' == 'true'">$(ProjectBuildReason) in tarball</ProjectBuildReason>
43+
</PropertyGroup>
44+
3845
<!-- for RTM only, default to stabilized builds because that's what matches the official builds -->
3946
<!-- once https://github.com/dotnet/source-build/issues/550 is fixed we will be able to determine this automatically -->
4047
<PropertyGroup>

repos/dir.targets

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,15 @@
229229
</Target>
230230

231231
<Target Name="Build" DependsOnTargets="BuildRepoReferences">
232-
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Building '$(RepositoryName)'" />
232+
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Building $(ProjectBuildReason)" />
233233
<Message Importance="High" Text="Running command:" />
234234
<Message Importance="High" Text=" $(BuildCommand) $(RepoApiArgs)" Condition="'$(BuildCommand)' != ''" />
235235
<Message Importance="High" Text=" Using custom build target" Condition="'$(BuildCommand)' == ''" />
236236
<Message Importance="High" Text=" Log: $(RepoConsoleLogFile)" />
237-
<Message Importance="High" Text=" With Enivornment Varibles:" />
237+
<Message Importance="High" Text=" With Environment Variables:" />
238238
<Message Importance="High" Text=" %(EnvironmentVariables.Identity)" />
239239
<CallTarget Targets="RepoBuild" />
240-
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Building '$(RepositoryName)'...done" />
240+
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Building $(ProjectBuildReason)...done" />
241241
<OnError ExecuteTargets="ReportRepoError" />
242242
</Target>
243243

@@ -255,14 +255,14 @@
255255
</Target>
256256

257257
<Target Name="Package" AfterTargets="Build" Condition="'$(BuildPackagesCommand)' != ''">
258-
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Packaging '$(RepositoryName)'" />
258+
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Packaging $(ProjectBuildReason)" />
259259
<Message Importance="High" Text="Running command:" />
260260
<Message Importance="High" Text=" $(BuildPackagesCommand)" />
261261
<Message Importance="High" Text=" Log: $(RepoConsoleLogFile)" />
262-
<Message Importance="High" Text=" With Enivornment Varibles:" />
262+
<Message Importance="High" Text=" With Environment Variables:" />
263263
<Message Importance="High" Text=" %(EnvironmentVariables.Identity)" />
264264
<Exec Command="$(BuildPackagesCommand) $(RedirectRepoOutputToLog)" WorkingDirectory="$(ProjectDirectory)" EnvironmentVariables="@(EnvironmentVariables)" />
265-
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Packaging '$(RepositoryName)'...done" />
265+
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Packaging $(ProjectBuildReason)...done" />
266266
<OnError ExecuteTargets="ReportRepoError" />
267267
</Target>
268268

support/tarball/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1
1111
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
1212
export NUGET_PACKAGES="$SCRIPT_ROOT/packages/"
1313

14-
MSBUILD_ARGUMENTS=("/p:OfflineBuild=true" "/flp:v=detailed" "/clp:v=detailed")
14+
MSBUILD_ARGUMENTS=("/p:OfflineBuild=true" "/flp:v=detailed")
1515

1616
echo "Rebuild reference assemblies"
1717
$CLI_ROOT/dotnet $CLI_ROOT/sdk/$CLI_VERSION/MSBuild.dll $SCRIPT_ROOT/tools-local/init-build.proj /t:BuildReferenceAssemblies ${MSBUILD_ARGUMENTS[@]} "$@"

0 commit comments

Comments
 (0)