diff --git a/.githooks/pre-commit b/.githooks/pre-commit deleted file mode 100644 index 0b9d0942da21..000000000000 --- a/.githooks/pre-commit +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -LC_ALL=C - -# Select files to format -FILES=$(git show --name-only --pretty="") -[ -z "$FILES" ] && exit 0 - -# Format all selected files with dotnet-format -echo "dotnet-format: Formatting changed source files.." -echo "$FILES" | cat | xargs | sed -e 's/ /,/g' | xargs dotnet-format --folder . --include >/dev/null -echo "dotnet-format: $(git diff --cached --numstat | wc -l) file(s) formatted." - -# Add files to staging -echo "$FILES" | xargs git add -exit 0 \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index 9716479ed8ae..5c2671d2a6a0 100644 --- a/build.ps1 +++ b/build.ps1 @@ -356,10 +356,6 @@ if (-not $foundJdk -and $RunBuild -and ($All -or $BuildJava) -and -not $NoBuildJ Write-Error "Could not find the JDK. Either run $PSScriptRoot\eng\scripts\InstallJdk.ps1 to install for this repo, or install the JDK globally on your machine (see $PSScriptRoot\docs\BuildFromSource.md for details)." } -# We need to change default git hooks directory as .git folder is not tracked. And by default hooks are stored in .git/hooks folder. -# So we are setting git hooks default directory to .githooks, so that we can track and version the git hooks. -& git config core.hooksPath .githooks - # Initialize global variables need to be set before the import of Arcade is imported $restore = $RunRestore