dotnet / dotnet/arcade

Allow artifacts and dotnet installation directory to be overridden

Open
#1,293 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
729
Forks
397
Avg merge
3d 15m
Merged PRs (30d)
149

Description

The arcade `tools.ps1` and `tools.sh` scripts currently set the `ArtifactsDir` or `artifacts_dir` unconditionally. It looks like they respect the DOTNET_INSTALL_DIR environment variable, but if it is set then it needs to be to a location where the .NET SDK is already installed. There's no way to specify a path to override the location where the scripts will download the .NET SDK to if necessary.

I'd like to be able to override both of these locations with environment variables. `RepoLayout.props` might also need to be adjusted in sync with the script changes.

This would be helpful because in dotnet/core-sdk, we use Docker to build for various flavors of Linux. This is also useful for local development if we need to work with a specific version of Linux. However, since the repo root is shared from the host to the docker container, the build in the docker container would try to use the version of the .NET SDK that the host had installed, and would produce its output in the same paths as the host OS did. So to do a Docker build, we would need to clean the .dotnet and artifacts folder in the repo. This makes it more painful to switch between building in the host and using Docker.

@tmat

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.