From 94be794ba8be4cf55308e70652691a5792d21c00 Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:36:20 -0400 Subject: [PATCH 1/3] Use GitHub Action instead of a filter for CRLF normalization --- .gitattributes | 11 +++++------ .gitconfig | 2 -- .github/workflows/enforce-crlf.yml | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 8 deletions(-) delete mode 100644 .gitconfig create mode 100644 .github/workflows/enforce-crlf.yml diff --git a/.gitattributes b/.gitattributes index 8572d0f..29f5ad5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,14 +1,13 @@ # By default, auto detect text files and perform LF normalization * text=auto eol=lf -# VBA extensions - Enforce CRLF using a filter - # To make sure the filter is active, run the command: git config include.path ../.gitconfig -*.bas -text filter=crlf -*.cls -text filter=crlf -*.frm -text filter=crlf +# VBA extensions - Prevent LF normalization +*.bas -text diff +*.cls -text diff +*.frm -text diff # VBA extensions - Mark as binary *.frx binary # AutoHotKey -*.ahk -text filter=crlf +*.ahk -text diff diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 4646a72..0000000 --- a/.gitconfig +++ /dev/null @@ -1,2 +0,0 @@ -[filter "crlf"] - clean = unix2dos diff --git a/.github/workflows/enforce-crlf.yml b/.github/workflows/enforce-crlf.yml new file mode 100644 index 0000000..d57f24b --- /dev/null +++ b/.github/workflows/enforce-crlf.yml @@ -0,0 +1,19 @@ +name: Enforce-CRLF + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: write + +jobs: + enforce-crlf: + runs-on: ubuntu-latest + steps: + - name: Enforce CRLF action + uses: DecimalTurn/Enforce-CRLF@v1 + with: + extensions: .bas, .frm, .cls \ No newline at end of file From ffcb3171420d071f9a7bbed6d41e5f688f865278 Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Wed, 17 Jul 2024 22:17:56 -0400 Subject: [PATCH 2/3] Update and rename enforce-crlf.yml to enforce_crlf.yml --- .github/workflows/{enforce-crlf.yml => enforce_crlf.yml} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename .github/workflows/{enforce-crlf.yml => enforce_crlf.yml} (61%) diff --git a/.github/workflows/enforce-crlf.yml b/.github/workflows/enforce_crlf.yml similarity index 61% rename from .github/workflows/enforce-crlf.yml rename to .github/workflows/enforce_crlf.yml index d57f24b..e647eb1 100644 --- a/.github/workflows/enforce-crlf.yml +++ b/.github/workflows/enforce_crlf.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Enforce CRLF action - uses: DecimalTurn/Enforce-CRLF@v1 + uses: DecimalTurn/Enforce-CRLF@08706ea4cc4a3de32d8b3c769686355a22d69e84 #v1.1.2 with: - extensions: .bas, .frm, .cls \ No newline at end of file + extensions: .bas, .frm, .cls + From 7069363bab7b2f70f5530beb44bd69acfe1377ff Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Wed, 17 Jul 2024 22:34:28 -0400 Subject: [PATCH 3/3] Update enforce_crlf.yml --- .github/workflows/enforce_crlf.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/enforce_crlf.yml b/.github/workflows/enforce_crlf.yml index e647eb1..3e60f9f 100644 --- a/.github/workflows/enforce_crlf.yml +++ b/.github/workflows/enforce_crlf.yml @@ -17,4 +17,6 @@ jobs: uses: DecimalTurn/Enforce-CRLF@08706ea4cc4a3de32d8b3c769686355a22d69e84 #v1.1.2 with: extensions: .bas, .frm, .cls + do-checkout: true + do-push: true