diff --git a/.gitattributes b/.gitattributes index 6d7ea8d..1282838 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,3 +13,34 @@ *.ttf binary *.wasm binary *.wav binary + +# Files to exclude from asset-lib download. +/.github export-ignore +/addons/gd-plug export-ignore +/docs export-ignore +/examples export-ignore +/misc export-ignore +/test export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.gitmodules export-ignore +/CHANGELOG.md export-ignore +/LICENSE.md export-ignore +/README.md export-ignore +/default_env.tres export-ignore +/export_presets.cfg export-ignore +/icon.png export-ignore +/icon.png.import export-ignore +/plug.gd export-ignore +/project.godot export-ignore +/.github export-ignore +/.import export-ignore +/test export-ignore +/project.godot export-ignore +/default_env.tres export-ignore +/.gutconfig.json export-ignore +/README.md export-ignore +/addons/gd-plug export-ignore +/plug.gd export-ignore +/LICENSE export-ignore +/misc export-ignore diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ee46ab..aac0d59 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -239,3 +239,38 @@ jobs: with: run: ./godot_executable/${{ env.GODOT }} --no-window -s addons/gut/gut_cmdln.gd -gconfig=test/.gutconfig.unix.json + + # Git archive should only include addons/godot_xterm directory. + check-archive: + name: 'Check Archive' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Create git archive + run: git archive -o archive.zip HEAD + - name: Extract archive + run: mkdir -p /tmp/unzipped && unzip archive.zip -d /tmp/unzipped + - name: Check that archive only contains addons directory + run: | + shopt -s nullglob dotglob + ls -lR /tmp/unzipped + files=(/tmp/unzipped/*) + if [ ${#files[@]} -ne 1 ]; then + echo "Wrong number of files in archive (${#files[@]}) expected 1." + exit 1 + fi + if [ ! -d "/tmp/unzipped/addons" ]; then + echo "Expected directory (addons) not found." + exit 1 + fi + files=(/tmp/unzipped/addons) + if [ ${#files[@]} -ne 1 ]; then + echo "Wrong number of files in addons directory (${#files[@]}) expected 1." + exit 1 + fi + if [ ! -d "/tmp/unzipped/addons/godot_xterm" ]; then + echo "Expected directory (addons/godot_xterm) not found." + exit 1 + fi diff --git a/README.md b/README.md index 553fd9e..30545b0 100644 --- a/README.md +++ b/README.md @@ -177,9 +177,9 @@ You are also implicitly verifying that all code is your original work, or unorig ### Third-party components -The GDNative source code incorporates code snippets and source code from many third-party libraries. The licenses of these components can be found in the various sub-directories of this project (provided git submodules have been cloned). Many of these licenses must be distributed with source and binary distributions of this software. For convenience, the texts of these licenses have been bundled together (but clearly demarcated) in the [THIRDPARTY_NOTICES.txt](/THIRDPARTY_NOTICES.txt) file. +The GDNative source code incorporates code snippets and source code from many third-party libraries. The licenses of these components can be found in the various sub-directories of this project (provided git submodules have been cloned). Many of these licenses must be distributed with source and binary distributions of this software. For convenience, the texts of these licenses have been bundled together (but clearly demarcated) in the [THIRDPARTY_NOTICES.txt](/addons/godot_xterm/THIRDPARTY_NOTICES.txt) file. -**Note:** On platforms where the PTY node is not supported or if the library has been compiled with the option `disable_pty=yes` then only the licenses bundled in [THIRDPARTY_NOTICES_nopty.txt](/THIRDPARTY_NOTICES_nopty.txt) are applicable. +**Note:** On platforms where the PTY node is not supported or if the library has been compiled with the option `disable_pty=yes` then only the licenses bundled in [THIRDPARTY_NOTICES_nopty.txt](/addons/godot_xterm/THIRDPARTY_NOTICES_nopty.txt) are applicable. [build.sh]: /addons/godot_xterm/native/build.sh [dist]: /addons/godot_xterm/native/dist diff --git a/THIRDPARTY_NOTICES.txt b/addons/godot_xterm/THIRDPARTY_NOTICES.txt similarity index 100% rename from THIRDPARTY_NOTICES.txt rename to addons/godot_xterm/THIRDPARTY_NOTICES.txt diff --git a/THIRDPARTY_NOTICES_nopty.txt b/addons/godot_xterm/THIRDPARTY_NOTICES_nopty.txt similarity index 100% rename from THIRDPARTY_NOTICES_nopty.txt rename to addons/godot_xterm/THIRDPARTY_NOTICES_nopty.txt diff --git a/misc/gen_3rdparty_notices.sh b/misc/gen_3rdparty_notices.sh index 391d42f..64f30c9 100755 --- a/misc/gen_3rdparty_notices.sh +++ b/misc/gen_3rdparty_notices.sh @@ -6,7 +6,7 @@ # Based on the format of microsoft/vscodes ThirdPartyNotices.txt file: # https://github.com/Microsoft/vscode/blob/main/ThirdPartyNotices.txt -out=THIRDPARTY_NOTICES.txt +out=addons/godot_xterm/THIRDPARTY_NOTICES.txt # List of licenses to be concatenated. # Format (space seperated): Software name, Path to license file from git repo root.