diff options
Diffstat (limited to 'misc/scripts')
-rwxr-xr-x | misc/scripts/codespell.sh | 9 | ||||
-rwxr-xr-x | misc/scripts/compare_extension_api.py | 11 | ||||
-rwxr-xr-x | misc/scripts/copyright_headers.py | 58 | ||||
-rwxr-xr-x | misc/scripts/file_format.sh | 22 | ||||
-rwxr-xr-x | misc/scripts/install_vulkan_sdk_macos.sh | 10 |
5 files changed, 57 insertions, 53 deletions
diff --git a/misc/scripts/codespell.sh b/misc/scripts/codespell.sh index c00d897666..1268350180 100755 --- a/misc/scripts/codespell.sh +++ b/misc/scripts/codespell.sh @@ -1,5 +1,8 @@ #!/bin/sh -SKIP_LIST="./.git,./bin,./thirdparty,*.gen.*,*.po,*.pot,package-lock.json,./core/string/locales.h,./DONORS.md,./misc/dist/linux/org.godotengine.Godot.desktop,./misc/scripts/codespell.sh" -IGNORE_LIST="alo,ba,childs,complies,curvelinear,doubleclick,expct,fave,findn,gird,gud,inout,lod,nd,numer,ois,readded,ro,sav,statics,te,varius,varn,wan" +SKIP_LIST="./.*,./**/.*,./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./AUTHORS.md,./COPYRIGHT.txt,./DONORS.md," +SKIP_LIST+="./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/project_converter_3_to_4.cpp,./misc/scripts/codespell.sh," +SKIP_LIST+="./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json," -codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" +IGNORE_LIST="curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,nd,numer,ot,te" + +codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" --builtin "clear,rare,en-GB_to_en-US" diff --git a/misc/scripts/compare_extension_api.py b/misc/scripts/compare_extension_api.py deleted file mode 100755 index f96db4278c..0000000000 --- a/misc/scripts/compare_extension_api.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import sys - -# TODO: -# Add a process that compares the original godot-cpp/godot-headers/extension_api.json with the new extension_api.json (both passed as arguments) and reports any API calls that have been removed. -# If we only have additions or no changes to the file, we pass -# For now we deem this too early because the API isn't stable enough yet. - -sys.exit(0) diff --git a/misc/scripts/copyright_headers.py b/misc/scripts/copyright_headers.py index cf3adbfbfa..a5e2f0c05d 100755 --- a/misc/scripts/copyright_headers.py +++ b/misc/scripts/copyright_headers.py @@ -4,35 +4,35 @@ import sys header = """\ -/*************************************************************************/ -/* $filename */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ +/**************************************************************************/ +/* $filename */ +/**************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/**************************************************************************/ +/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ +/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/**************************************************************************/ """ fname = sys.argv[1] diff --git a/misc/scripts/file_format.sh b/misc/scripts/file_format.sh index 1200b96ea0..3ff5798e22 100755 --- a/misc/scripts/file_format.sh +++ b/misc/scripts/file_format.sh @@ -4,9 +4,9 @@ # This is supplementary to clang_format.sh and black_format.sh, but should be # run before them. -# We need dos2unix and recode. -if [ ! -x "$(command -v dos2unix)" -o ! -x "$(command -v recode)" ]; then - printf "Install 'dos2unix' and 'recode' to use this script.\n" +# We need dos2unix and isutf8. +if [ ! -x "$(command -v dos2unix)" -o ! -x "$(command -v isutf8)" ]; then + printf "Install 'dos2unix' and 'isutf8' (moreutils package) to use this script.\n" fi set -uo pipefail @@ -31,7 +31,9 @@ while IFS= read -rd '' f; do continue elif [[ "$f" == *"po" ]]; then continue - elif [[ "$f" == "thirdparty"* ]]; then + elif [[ "$f" == "thirdparty/"* ]]; then + continue + elif [[ "$f" == *"/thirdparty/"* ]]; then continue elif [[ "$f" == "platform/android/java/lib/src/com/google"* ]]; then continue @@ -51,22 +53,24 @@ done diff=$(git diff --color) -# If no UTF-8 violations were collected and no diff has been -# generated all is OK, clean up, and exit. if [ ! -s utf8-validation.txt ] && [ -z "$diff" ] ; then + # If no UTF-8 violations were collected (the file is empty) and + # no diff has been generated all is OK, clean up, and exit. printf "Files in this commit comply with the formatting rules.\n" - rm -f utf8-violations.txt + rm -f utf8-validation.txt exit 0 fi -# Violations detected, notify the user, clean up, and exit. if [ -s utf8-validation.txt ] then + # If the file has content and is not empty, violations + # detected, notify the user, clean up, and exit. printf "\n*** The following files contain invalid UTF-8 character sequences:\n\n" cat utf8-validation.txt - rm -f utf8-validation.txt fi +rm -f utf8-validation.txt + if [ ! -z "$diff" ] then printf "\n*** The following differences were found between the code " diff --git a/misc/scripts/install_vulkan_sdk_macos.sh b/misc/scripts/install_vulkan_sdk_macos.sh index d78659fa9f..17d567f208 100755 --- a/misc/scripts/install_vulkan_sdk_macos.sh +++ b/misc/scripts/install_vulkan_sdk_macos.sh @@ -8,7 +8,15 @@ curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg" -o /tmp/ hdiutil attach /tmp/vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk /Volumes/vulkan-sdk/InstallVulkan.app/Contents/MacOS/InstallVulkan \ --accept-licenses --default-answer --confirm-command install -hdiutil detach /Volumes/vulkan-sdk + +cnt=5 +until hdiutil detach -force /Volumes/vulkan-sdk +do + [[ cnt -eq "0" ]] && break + sleep 1 + ((cnt--)) +done + rm -f /tmp/vulkan-sdk.dmg echo 'Vulkan SDK installed successfully! You can now build Godot by running "scons".' |