Skip to content

Commit 916c1a4

Browse files
authored
Revert init-nuget workaround (dotnet#45005)
1 parent d34731a commit 916c1a4

File tree

2 files changed

+4
-34
lines changed

2 files changed

+4
-34
lines changed

Diff for: .azure/pipelines/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,13 @@ stages:
486486
$(_InternalRuntimeDownloadArgs)
487487
displayName: Run build.sh
488488
- script: git clean -xfd src/**/obj/;
489-
./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget
489+
./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs
490490
-p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=deb
491491
$(_BuildArgs)
492492
$(_InternalRuntimeDownloadArgs)
493493
displayName: Build Debian installers
494494
- script: git clean -xfd src/**/obj/;
495-
./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget
495+
./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs
496496
-p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm
497497
-p:AssetManifestFileName=aspnetcore-Linux_x64.xml
498498
$(_BuildArgs)
@@ -563,7 +563,7 @@ stages:
563563
$(_InternalRuntimeDownloadArgs)
564564
displayName: Run build.sh
565565
- script: git clean -xfd src/**/obj/;
566-
./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs --init-nuget
566+
./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs
567567
-p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm
568568
-p:AssetManifestFileName=aspnetcore-Linux_arm64.xml
569569
$(_BuildArgs)

Diff for: eng/build.sh

+1-31
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ target_arch='x64'
3333
configuration=''
3434
runtime_source_feed=''
3535
runtime_source_feed_key=''
36-
init_nuget=false
3736

3837
if [ "$(uname)" = "Darwin" ]; then
3938
target_os_name='osx'
@@ -83,8 +82,6 @@ Options:
8382
--runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs
8483
--runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs
8584
86-
--init-nuget Run nuget --version.
87-
8885
Description:
8986
This build script installs required tools and runs an MSBuild command on this repository
9087
This script can be used to invoke various targets, such as targets to produce packages
@@ -211,9 +208,6 @@ while [[ $# -gt 0 ]]; do
211208
-ci)
212209
ci=true
213210
;;
214-
-init-nuget)
215-
init_nuget=true
216-
;;
217211
-binarylog|-bl)
218212
binary_log=true
219213
;;
@@ -365,30 +359,6 @@ export MSBUILDDEBUGPATH="$log_dir"
365359
_tmp_restore=$restore
366360
restore=true
367361

368-
if [[ "$init_nuget" == true ]]; then
369-
InitializeBuildTool
370-
371-
function RunBuildTool {
372-
"$_InitializeBuildTool" "$@" || {
373-
local exit_code=$?
374-
# We should not Write-PipelineTaskError here because that message shows up in the build summary
375-
# The build already logged an error, that's the reason it failed. Producing an error here only adds noise.
376-
echo "Build failed with exit code $exit_code. Check errors above."
377-
if [[ "$ci" == "true" ]]; then
378-
Write-PipelineSetResult -result "Failed" -message "nuget execution failed."
379-
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
380-
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
381-
ExitWithExitCode 0
382-
else
383-
ExitWithExitCode $exit_code
384-
fi
385-
}
386-
}
387-
388-
echo 'Running dotnet nuget --version (issue: https://github.com/NuGet/Home/issues/12159#issuecomment-1278360511)'
389-
RunBuildTool "nuget" "--version"
390-
fi
391-
392362
InitializeToolset
393363

394364
restore=$_tmp_restore=
@@ -410,4 +380,4 @@ if [ "$only_build_repo_tasks" != true ]; then
410380
MSBuild $_InitializeToolset -p:RepoRoot="$repo_root" ${msbuild_args[@]+"${msbuild_args[@]}"}
411381
fi
412382

413-
ExitWithExitCode 0
383+
ExitWithExitCode 0

0 commit comments

Comments
 (0)