From 4588d74428be1b59a037e407b072a12f55888097 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 18 Aug 2021 20:52:24 +0200 Subject: [PATCH] Convert crlf to lf in *.cs files after formatting so git status doesn't report wrong changes. --- .github/workflows/format-check.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml index 48226dc82..98fe9a894 100644 --- a/.github/workflows/format-check.yml +++ b/.github/workflows/format-check.yml @@ -8,14 +8,14 @@ jobs: runs-on: ubuntu-latest steps: - - run: git config --global core.autocrlf false - - - uses: actions/checkout@v1 - - name: Install OS dependencies (needed for act on ubuntu-latest) run: | sudo apt update - sudo apt install -y --force-yes curl xz-utils libicu-dev git + sudo apt install -y --force-yes curl xz-utils libicu-dev git dos2unix + git config --global core.autocrlf input + git config --global core.eol + + - uses: actions/checkout@v1 - name: Cache Clang id: cache-clang @@ -54,10 +54,12 @@ jobs: run: | export CLANGFORMAT=`pwd`/clang/bin/clang-format export PATH="$PATH:/root/.dotnet/tools" - ./formatters/format.sh - git diff + ./formatters/format.sh + find . -type f -name '*.php' -exec dos2unix '{}' + git diff > format-diff.txt + - run: spine-csharp/src/Atlas.cs + - name: Archive formatting result uses: actions/upload-artifact@v2 with: