From 51a20de10c91d549492d89caa245a028a5c02cdf Mon Sep 17 00:00:00 2001 From: Pandapip1 <45835846+Pandapip1@users.noreply.github.com> Date: Sat, 30 Jul 2022 19:54:26 -0400 Subject: [PATCH 1/6] Add license checker --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fd59576a5b471..c442e808c3d7de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,3 +90,13 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} unchecked: '1,5069' + + check-license-lines: + name: Check licenses + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + + - name: Check License Lines + uses: kt3k/license_checker@d12a6d90c58e30fefed09f2c4d03ba57f4c673a8 From 12f811389067e1762df415c836ee8103ed8019c4 Mon Sep 17 00:00:00 2001 From: Pandapip1 <45835846+Pandapip1@users.noreply.github.com> Date: Sat, 30 Jul 2022 20:05:07 -0400 Subject: [PATCH 2/6] =?UTF-8?q?Voil=C3=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .licenserc.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .licenserc.json diff --git a/.licenserc.json b/.licenserc.json new file mode 100644 index 00000000000000..fbb231bea83390 --- /dev/null +++ b/.licenserc.json @@ -0,0 +1,8 @@ +{ + "**/*.{js,ts,sol}": "// SPDX-License-Identifier: CC0-1.0", + "ignore": [ + "assets/eip-3267", + "assets/eip-4675", + "assets/eip-4886", + ] +} From 533d083c303e9f6b828791d63bcd6e62647b7ffb Mon Sep 17 00:00:00 2001 From: Pandapip1 <45835846+Pandapip1@users.noreply.github.com> Date: Sat, 30 Jul 2022 20:08:32 -0400 Subject: [PATCH 3/6] O o p s --- .licenserc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.licenserc.json b/.licenserc.json index fbb231bea83390..df771f704972ea 100644 --- a/.licenserc.json +++ b/.licenserc.json @@ -3,6 +3,6 @@ "ignore": [ "assets/eip-3267", "assets/eip-4675", - "assets/eip-4886", + "assets/eip-4886" ] } From bdc1bcb3d2ffd84603c4b756acf88eace830db3e Mon Sep 17 00:00:00 2001 From: Pandapip1 <45835846+Pandapip1@users.noreply.github.com> Date: Sat, 30 Jul 2022 20:16:27 -0400 Subject: [PATCH 4/6] Add a bunch of exceptions, because nothing is perfect --- .licenserc.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.licenserc.json b/.licenserc.json index df771f704972ea..05efb0a0ca934b 100644 --- a/.licenserc.json +++ b/.licenserc.json @@ -1,8 +1,18 @@ { "**/*.{js,ts,sol}": "// SPDX-License-Identifier: CC0-1.0", "ignore": [ + "assets/eip-712", "assets/eip-3267", + "assets/eip-3475", + "assets/eip-3525", + "assets/eip-4361", + "assets/eip-4400", + "assets/eip-4519", "assets/eip-4675", - "assets/eip-4886" + "assets/eip-4886", + "assets/eip-4907", + "assets/eip-4987", + "assets/eip-5006", + "assets/eip-5007" ] } From 7534f97f6840c25dcdadd72833247b28cd2d8e1e Mon Sep 17 00:00:00 2001 From: Pandapip1 <45835846+Pandapip1@users.noreply.github.com> Date: Mon, 1 Aug 2022 10:50:27 -0400 Subject: [PATCH 5/6] Or I thought I had made that change --- .licenserc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.licenserc.json b/.licenserc.json index 05efb0a0ca934b..cb3603df9e253d 100644 --- a/.licenserc.json +++ b/.licenserc.json @@ -1,5 +1,5 @@ { - "**/*.{js,ts,sol}": "// SPDX-License-Identifier: CC0-1.0", + "**/*.{sol}": "// SPDX-License-Identifier: CC0-1.0", "ignore": [ "assets/eip-712", "assets/eip-3267", From d261332bb3ee297b3a95ffb9413e67a902ac5149 Mon Sep 17 00:00:00 2001 From: Pandapip1 <45835846+Pandapip1@users.noreply.github.com> Date: Mon, 1 Aug 2022 11:38:25 -0400 Subject: [PATCH 6/6] If it works don't fix it --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c442e808c3d7de..e55a97d13b1c2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,5 +98,29 @@ jobs: - name: Checkout uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@6c44eb8294bb9c93d6118427f4ff8404b695e1d7 + + - name: Delete Unmodified Files + run: | + cd $GITHUB_WORKSPACE + mkdir all + shopt -s extglob dotglob + mv !(all) all + shopt -u dotglob + mkdir unchanged + cd all + for FILE in ${{ steps.changed-files.outputs.all_changed_files }}; do + [ -f ${FILE} ] && mkdir -p $(dirname "../unchanged/${FILE}") + [ -f ${FILE} ] && cp ${FILE} ../unchanged/${FILE} + done + cd .. + rm -rf all + cd unchanged + cp -r unchanged/* . + cd .. + rm -rf unchanged + - name: Check License Lines uses: kt3k/license_checker@d12a6d90c58e30fefed09f2c4d03ba57f4c673a8