diff options
author | Jarret Shook <jashoo@microsoft.com> | 2019-06-10 14:13:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-10 14:13:27 -0700 |
commit | 730c3c5c66183418adbbc63acd40d261c9ce23ed (patch) | |
tree | 6e8d98a0fffaefca0c46e9667afeeb1dc051b4dc /build.sh | |
parent | 64855db283bf84e8d47cfd6d5cde4248df3e0f50 (diff) | |
download | coreclr-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-x | build.sh | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -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." |