From fdbeae4e1679340af7ee7a3f743d645ebd619300 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 5 Dec 2019 15:51:58 +0100 Subject: [PATCH] Remove clean.cmd/sh scripts from coreclr root (#564) The clean.cmd/sh scripts aren't necessary anymore as coreclr now uses the user profile nuget cache for the packages and for the binaries there is a common -clean action in the arcade build root script which is invoked by the repo root scripts. --- src/coreclr/clean.cmd | 47 ----------------------------------------------- src/coreclr/clean.sh | 39 --------------------------------------- 2 files changed, 86 deletions(-) delete mode 100644 src/coreclr/clean.cmd delete mode 100755 src/coreclr/clean.sh diff --git a/src/coreclr/clean.cmd b/src/coreclr/clean.cmd deleted file mode 100644 index bfdda8f..0000000 --- a/src/coreclr/clean.cmd +++ /dev/null @@ -1,47 +0,0 @@ -@if not defined _echo @echo off -setlocal EnableDelayedExpansion - -set NO_DASHES_ARG=%1 -if not defined NO_DASHES_ARG goto no_help -if /I [%NO_DASHES_ARG:-=%] == [?] goto Usage -if /I [%NO_DASHES_ARG:-=%] == [h] goto Usage - -:no_help -:: Check if VBCSCompiler.exe is running -tasklist /fi "imagename eq VBCSCompiler.exe" |find ":" > nul -:: Compiler is running if errorlevel == 1 -if errorlevel 1 ( - echo Stop VBCSCompiler.exe execution. - for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F -) - -:: Strip all dashes off the argument and use invariant -:: compare to match as many versions of "all" that we can -:: All other argument validation happens inside Run.exe -if not defined NO_DASHES_ARG goto no_args -if /I [%NO_DASHES_ARG:-=%] == [all] ( - echo Cleaning entire working directory ... - call git clean -xdf - exit /b !ERRORLEVEL! -) - -:no_args -if [%1]==[] set __args=/t:CleanAllProjects -if [%1]==[-b] set __args=/t:CleanAllProjects -if [%1]==[-p] set __args=/t:CleanPackages -if [%1]==[-c] set __args=/t:CleanPackagesCache -call %~dp0dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false /flp:v=normal;LogFile=clean.log %__args% -exit /b %ERRORLEVEL% - -:Usage -echo. -echo Usage: clean [-b] [-p] [-c] [-all] -echo Repository cleaning script. -echo Options: -echo -b - Delete the binary output directory. -echo -p - Delete the repo-local NuGet package directory. -echo -c - Deletes the user-local NuGet package cache. -echo -all - Cleans repository and restores it to pristine state. -echo. -echo ^If no option is specified then "clean -b" is implied. -exit /b diff --git a/src/coreclr/clean.sh b/src/coreclr/clean.sh deleted file mode 100755 index 0a30b29..0000000 --- a/src/coreclr/clean.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -usage() -{ - echo "Usage: clean [-b] [-p] [-c] [-all]" - echo "Repository cleaning script." - echo " -b Delete the binary output directory." - echo " -p Delete the repo-local NuGet package directory." - echo " -c Delete the user-local NuGet package caches." - echo " -all Cleans repository and restores it to pristine state." - echo - echo "If no option is specified, then \"clean.sh -b\" is implied." - exit 1 -} - -if [ "$1" == "-?" ] || [ "$1" == "-h" ]; then - usage -fi - -# Implement VBCSCompiler.exe kill logic once VBCSCompiler.exe is ported to unixes - -__working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -if [ "$*" == "-all" ] -then - echo "Removing all untracked files in the working tree" - git clean -xdf $__working_tree_root - exit $? -elif [ $# == 0 ] || [ "$*" == "-b" ]; then - __args="/t:CleanAllProjects" -elif [ "$*" == "-p" ]; then - __args="/t:CleanPackages" -elif [ "$*" == "-c" ]; then - __args="/t:CleanPackagesCache" -fi - - -$__working_tree_root/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary /flp:v=normal\;LogFile=clean.log $__args -exit $? -- 2.7.4