Skip to content

Commit

Permalink
Add mac build env script
Browse files Browse the repository at this point in the history
  • Loading branch information
William Li committed Jun 29, 2020
1 parent 6fe2133 commit 51c5a91
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions eng/restore-toolset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function InitializeCustomSDKToolset {
InstallDotNetSharedFramework "2.1.0"
InstallDotNetSharedFramework "2.2.8"
InstallDotNetSharedFramework "3.1.0"

CreateBuildEnvScript
}

# Installs additional shared frameworks for testing purposes
Expand All @@ -37,4 +39,22 @@ function InstallDotNetSharedFramework {
fi
}

function CreateBuildEnvScript {
mkdir -p $artifacts_dir
scriptPath="$artifacts_dir/sdk-build-env.sh"
scriptContents="
#!/bin/bash
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
export DOTNET_MULTILEVEL_LOOKUP=0
export DOTNET_ROOT=$DOTNET_INSTALL_DIR
export DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=$DOTNET_INSTALL_DIR
export PATH=$DOTNET_INSTALL_DIR:\$PATH
export NUGET_PACKAGES=$NUGET_PACKAGES
"

echo "$scriptContents" > ${scriptPath}
}

InitializeCustomSDKToolset

0 comments on commit 51c5a91

Please sign in to comment.