summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorJarret Shook <jashoo@microsoft.com>2019-06-10 14:13:27 -0700
committerGitHub <noreply@github.com>2019-06-10 14:13:27 -0700
commit730c3c5c66183418adbbc63acd40d261c9ce23ed (patch)
tree6e8d98a0fffaefca0c46e9667afeeb1dc051b4dc /build.sh
parent64855db283bf84e8d47cfd6d5cde4248df3e0f50 (diff)
downloadcoreclr-730c3c5c66183418adbbc63acd40d261c9ce23ed.tar.gz
coreclr-730c3c5c66183418adbbc63acd40d261c9ce23ed.tar.bz2
coreclr-730c3c5c66183418adbbc63acd40d261c9ce23ed.zip
Add source-build hook for dotnet install (#24929)
* Add source-build hook for dotnet install * Fix batch syntax * Address feedback * Use the correct returned variables: unix: _InitializeDotNetCli windows: DOTNET_TOOL_DIR * Remove changes to dotnet.cmd * Do not export, just use _InitializeDotNetCli
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh13
1 files changed, 5 insertions, 8 deletions
diff --git a/build.sh b/build.sh
index 78ee31dc19..f3e0b303d6 100755
--- a/build.sh
+++ b/build.sh
@@ -150,14 +150,11 @@ restore_optdata()
if [ $__isMSBuildOnNETCoreSupported == 1 ]; then
# Parse the optdata package versions out of msbuild so that we can pass them on to CMake
- local DotNetCli="$__ProjectRoot/.dotnet/dotnet"
- if [ ! -f $DotNetCli ]; then
- source "$__ProjectRoot/init-dotnet.sh"
- if [ $? != 0 ]; then
- echo "Failed to install dotnet."
- exit 1
- fi
- fi
+
+ # Init dotnet
+ source "${__ProjectRoot}/init-dotnet.sh"
+ local DotNetCli=${_InitializeDotNetCli}/dotnet
+
__PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo)
if [ $? != 0 ]; then
echo "Failed to get PGO data package version."