diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c356f423..a842dcf8 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -20,7 +20,18 @@ jobs: - name: Checkout source code uses: actions/checkout@v4 - - name: Validate licenses + - name: Validate license (pull request) + if: github.event_name == 'pull_request' + working-directory: ${{github.workspace}} + run: | + git diff --name-only ${{ github.event.base_ref }} ${{ github.event.head_ref }} \ + | sed -E 's/\.license$//' \ + | sort -u \ + | xargs -d '\n' ls -1d 2>/dev/null \ + | xargs -d '\n' python3 -m pipx run reuse lint-files -- + + - name: Validate licenses (push) + if: github.event_name == 'push' working-directory: ${{github.workspace}} run: | python3 -m pipx run reuse lint diff --git a/.reuse/dep5 b/.reuse/dep5 deleted file mode 100644 index fe5fe066..00000000 --- a/.reuse/dep5 +++ /dev/null @@ -1,26 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: Celestia Content -Upstream-Contact: Celestia Development Team -Source: https://github.com/CelestiaProject/CelestiaContent - -Files: README -Copyright: Celestia Development Team -License: GPL-2.0-or-later - -Files: .github/* -Copyright: Celestia Development Team -License: GPL-2.0-or-later - -Files: debian/* -Copyright: 2001-2002 Marcelo E. Magallon - 2003 Mika Fischer - 2005 Mathias Weyland - 2007-2013 Guus Sliepen - 2019 Celestia Development Team -License: GPL-2.0-or-later - -# Sample paragraph, commented out: -# -# Files: src/* -# Copyright: $YEAR $NAME <$CONTACT> -# License: ... diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 00000000..0e60a3e9 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,22 @@ +version = 1 +SPDX-PackageName = "Celestia Content" +SPDX-PackageSupplier = "Celestia Development Team" +SPDX-PackageDownloadLocation = "https://github.com/CelestiaProject/CelestiaContent" + +[[annotations]] +path = "README" +precedence = "aggregate" +SPDX-FileCopyrightText = "Celestia Development Team" +SPDX-License-Identifier = "GPL-2.0-or-later" + +[[annotations]] +path = ".github/**" +precedence = "aggregate" +SPDX-FileCopyrightText = "Celestia Development Team" +SPDX-License-Identifier = "GPL-2.0-or-later" + +[[annotations]] +path = "debian/**" +precedence = "aggregate" +SPDX-FileCopyrightText = ["2001-2002 Marcelo E. Magallon ", "2003 Mika Fischer ", "2005 Mathias Weyland ", "2007-2013 Guus Sliepen ", "2019 Celestia Development Team"] +SPDX-License-Identifier = "GPL-2.0-or-later"