Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/scripts/update-checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# - Docker Compose files for offline usage support
# - File formatting (trailing newlines, whitespace)
# - Proper shebangs in command files
# - Command files are executable
#
# Usage (run from the add-on root directory):
# curl -fsSL https://ddev.com/s/addon-update-checker.sh | bash
Expand Down Expand Up @@ -197,6 +198,14 @@ check_shebang() {
done < <(find commands -type f -print0 2>/dev/null || true)
}

# Check that certain commands/**/* files are executable
check_command_executability() {
local file
while IFS= read -r -d '' file; do
actions+=("$file should be executable")
done < <(find commands -type f \! -executable -print0 2>/dev/null || true)
Comment thread
stasadev marked this conversation as resolved.
Outdated
}

# Check .github/workflows/tests.yml for required conditions
check_tests_workflow() {
local tests_yml=".github/workflows/tests.yml"
Expand Down Expand Up @@ -278,7 +287,7 @@ check_addon_template_mentions() {
# Check LICENSE file for Apache License
check_license() {
local license_file="LICENSE"

if [[ -f "$license_file" ]]; then
if ! grep -q "Apache License" "$license_file"; then
actions+=("LICENSE should contain 'Apache License', see upstream file $UPSTREAM/$license_file")
Expand Down Expand Up @@ -368,6 +377,9 @@ main() {
# Check shebang in commands/**/* files
check_shebang

# Check commands/**/* files are executable
check_command_executability

# Check tests workflow
check_tests_workflow

Expand Down
Loading