summaryrefslogtreecommitdiff
path: root/dotnet.sh
diff options
context:
space:
mode:
authorSven Boemer <sbomer@gmail.com>2019-01-30 16:24:33 -0800
committerGitHub <noreply@github.com>2019-01-30 16:24:33 -0800
commit1b43bd8139d053e24ec51c193054555e3352371a (patch)
treea61f5c4012ef53d7058edb6ff2fe26fbe07ddccb /dotnet.sh
parentdbb42159bba3d147559032ee496b55aa7e94e6f7 (diff)
downloadcoreclr-1b43bd8139d053e24ec51c193054555e3352371a.tar.gz
coreclr-1b43bd8139d053e24ec51c193054555e3352371a.tar.bz2
coreclr-1b43bd8139d053e24ec51c193054555e3352371a.zip
Remove run.exe and config.json (#21608)
This moves us one step away from buildtools and towards arcade. This replaces run.sh and run.cmd (and all invocations) with "dotnet.sh msbuild" and "msbuild.cmd". - I'm using these wrapper scripts for now instead of those in eng/common in order to retain the very helpful "Running <command>" output in the build logs. - I'm using msbuild.cmd instead of dotnet.sh to match the current behavior that uses desktop msbuild on windows, instead of dotnet. All of the arguments that used to be implicitly generated by run.exe and config.json are now explicit, resulting in longer (but easier to copy+paste) commands. Some of these arguments are likely unnecessary, but in this change my goal is just to match the run.exe behavior. Later, I would like to go through and clean up parameters that don't need to be passed in every invocation. I might also consider moving more of the common arguments out into variables in a later change. Some of the wrapper scripts now have limited support for parsing "-Argument=Value" style parameters, to support our existing buildpipeline infrastructure, since I thought this was easier to test than changing our buildpipeline definitions. We can remove that parsing logic once we stop using buildpipeline (which has happened at this point). Some subtle parts of the change: * Add msbuild.cmd This simulates the behavior of Tools\msbuild.cmd, which calls desktop msbuild. * Fix BuildOS processing in package build and publish Previously, config.json had its own processing that would set OSName. Instead, we now pass it in explicitly where it's needed (building packages), or not at all (publishing them). * Handle "=" in publish-packages.cmd and other scripts This seems necessary to properly handle the azure access token * Set __BuildOS in PublishPackages Required for cases where the build OS isn't detected during the build such as freebsd. * Use dotnet msbuild in runtest.py This prevents us from having to deal with different quote escape behavior on windows and linux. Previously, arguments like fileloggerparameters and the logger were given quotes to escape semicolons in the argument. On unix, this prevented the argument from being split up by bash. On windows, it seems that the run.cmd/run.exe tools would prevent the extra quotes from being passed to msbuild.exe (desktop msbuild would choke on the quotes if they were passed along). Unlike desktop msbuild, dotnet msbuild is able to parse the quoted strings, so we simply psas the quoted arguments directly to it on windows. We may be able to do the same on unix. * Fix build-test.sh problem with BuildOS When copying native files during the unix test build, we rely on __BuildOS being set. Fixing the import order and always setting __BuildOS fixes this. We should eventually fix the inconsistent use of BuildOS vs __BuildOS.
Diffstat (limited to 'dotnet.sh')
-rwxr-xr-xdotnet.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/dotnet.sh b/dotnet.sh
new file mode 100755
index 0000000000..128f60b0bb
--- /dev/null
+++ b/dotnet.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+echo "Running init-tools.sh"
+source $working_tree_root/init-tools.sh
+
+toolRuntime=$working_tree_root/Tools
+dotnet=$toolRuntime/dotnetcli/dotnet
+
+echo "Running: $dotnet $@"
+$dotnet "$@"
+if [ $? -ne 0 ]
+then
+ echo "ERROR: An error occurred in $dotnet $@. Check logs under $working_tree_root."
+ exit 1
+fi
+
+echo "Command successfully completed."
+exit 0