Fix dotnet-wrapper to disable nodeReuse 24/239824/1 accepted/tizen/unified/20200730.130851 submit/tizen/20200730.052036
authorWonyoung Choi <wy80.choi@samsung.com>
Thu, 30 Jul 2020 05:12:04 +0000 (14:12 +0900)
committerWonyoung Choi <wy80.choi@samsung.com>
Thu, 30 Jul 2020 05:12:04 +0000 (14:12 +0900)
Change-Id: I734c7ff46a6f4027599e49792f1283752fcf5921

tools/dotnet-wrapper.sh

index 0b73238..0ef3f90 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -e
 
 DOTNET_CLI_PATH=/usr/share/dotnet-build-tools/sdk/dotnet
 
@@ -7,9 +7,8 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
 export DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2
 export MSBUILDDISABLENODEREUSE=true
 
-if [ "$1" == "msbuild" ]; then
-  ARGS="$@ /nodeReuse:false /p:UseSharedCompilation=false"
-elif [ "$1" == "restore" ]; then
+CMD=$1
+if [ "$CMD" == "restore" ]; then
   while [[ $# -gt 0 ]]; do
     x="$1"
     if [ $x == "-s" ] || [ $x == "--source" ]; then
@@ -22,11 +21,13 @@ elif [ "$1" == "restore" ]; then
     fi
     shift
   done
-elif [ "$1" == "build" ]; then
-  ARGS="$@ /p:UseSharedCompilation=false"
 else
   ARGS="$@"
 fi
 
+if [ "$CMD" == "msbuild" -o "$CMD" == "build" -o  "$CMD" == "restore" ] ; then
+  ARGS+=" /nodeReuse:false /p:UseSharedCompilation=false"
+fi
+
 echo $DOTNET_CLI_PATH $ARGS
 $DOTNET_CLI_PATH $ARGS