Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit abda726

Browse files
[azdo] make dotnet parameter optional (#1081)
Context: dotnet/android-libraries#247 Context: https://github.com/xamarin/Xamarin.Legacy.Sdk I'm testing out if we can multi-target the AndroidX libraries for `MonoAndroid90;net6.0-android`. Unfortunately the build fails because: 1. The `UseDotNet@2` yaml task can't install .NET 6.0.100-alpha.1.21064.27. We have to use the `dotnet-install` script to install it ourselves. 2. `dotnet tool` commands won't work, if there is a `global.json` file targeting `6.0.100-alpha.1.21064.27`. I think for now, we should make it so callers can set `dotnet: ''` and skip many of these steps. Callers can also leave the `tools: []` parameter blank. If a build needs to install .NET 6 and other .NET global tools, I think it will be able to be done in `preBuildSteps` after these changes.
1 parent 97da3d0 commit abda726

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.ci/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,13 @@ jobs:
106106
inputs:
107107
version: ${{ parameters.dotnet }}
108108
performMultiLevelLookup: true
109+
condition: ne('${{ parameters.dotnet }}', '')
109110
- pwsh: |
110111
dotnet tool install -g api-tools --version ${{ parameters.apiTools }}
111112
dotnet tool install -g cake.tool --version ${{ parameters.cake }}
112113
dotnet tool install -g Microsoft.DotNet.XHarness.CLI --version ${{ parameters.xharness }} --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json
113114
displayName: 'Install required .NET Core global tools'
115+
condition: ne('${{ parameters.dotnet }}', '')
114116
- ${{ each tool in parameters.tools }}:
115117
- ${{ each pair in tool }}:
116118
- pwsh: dotnet tool install -g ${{ pair.key }} --version ${{ pair.value }}

0 commit comments

Comments
 (0)