Skip to content

Commit

Permalink
Revert init-nuget workaround (#45005)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgodbe committed Nov 10, 2022
1 parent d34731a commit 916c1a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .azure/pipelines/ci.yml
Expand Up @@ -486,13 +486,13 @@ stages:
$(_InternalRuntimeDownloadArgs)
displayName: Run build.sh
- script: git clean -xfd src/**/obj/;
./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget
./dockerbuild.sh bionic --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs
-p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=deb
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
displayName: Build Debian installers
- script: git clean -xfd src/**/obj/;
./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs --init-nuget
./dockerbuild.sh rhel --ci --nobl --arch x64 --build-installers --no-build-deps --no-build-nodejs
-p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm
-p:AssetManifestFileName=aspnetcore-Linux_x64.xml
$(_BuildArgs)
Expand Down Expand Up @@ -563,7 +563,7 @@ stages:
$(_InternalRuntimeDownloadArgs)
displayName: Run build.sh
- script: git clean -xfd src/**/obj/;
./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs --init-nuget
./dockerbuild.sh rhel --ci --nobl --arch arm64 --build-installers --no-build-deps --no-build-nodejs
-p:OnlyPackPlatformSpecificPackages=true -p:BuildRuntimeArchive=false -p:LinuxInstallerType=rpm
-p:AssetManifestFileName=aspnetcore-Linux_arm64.xml
$(_BuildArgs)
Expand Down
32 changes: 1 addition & 31 deletions eng/build.sh
Expand Up @@ -33,7 +33,6 @@ target_arch='x64'
configuration=''
runtime_source_feed=''
runtime_source_feed_key=''
init_nuget=false

if [ "$(uname)" = "Darwin" ]; then
target_os_name='osx'
Expand Down Expand Up @@ -83,8 +82,6 @@ Options:
--runtime-source-feed Additional feed that can be used when downloading .NET runtimes and SDKs
--runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes and SDKs
--init-nuget Run nuget --version.
Description:
This build script installs required tools and runs an MSBuild command on this repository
This script can be used to invoke various targets, such as targets to produce packages
Expand Down Expand Up @@ -211,9 +208,6 @@ while [[ $# -gt 0 ]]; do
-ci)
ci=true
;;
-init-nuget)
init_nuget=true
;;
-binarylog|-bl)
binary_log=true
;;
Expand Down Expand Up @@ -365,30 +359,6 @@ export MSBUILDDEBUGPATH="$log_dir"
_tmp_restore=$restore
restore=true

if [[ "$init_nuget" == true ]]; then
InitializeBuildTool

function RunBuildTool {
"$_InitializeBuildTool" "$@" || {
local exit_code=$?
# We should not Write-PipelineTaskError here because that message shows up in the build summary
# The build already logged an error, that's the reason it failed. Producing an error here only adds noise.
echo "Build failed with exit code $exit_code. Check errors above."
if [[ "$ci" == "true" ]]; then
Write-PipelineSetResult -result "Failed" -message "nuget execution failed."
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
ExitWithExitCode 0
else
ExitWithExitCode $exit_code
fi
}
}

echo 'Running dotnet nuget --version (issue: https://github.com/NuGet/Home/issues/12159#issuecomment-1278360511)'
RunBuildTool "nuget" "--version"
fi

InitializeToolset

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

ExitWithExitCode 0
ExitWithExitCode 0

0 comments on commit 916c1a4

Please sign in to comment.