Skip to content

feat: add CI check for executable permissions on shell scripts#62

Merged
DeveloperC286 merged 5 commits into
mainfrom
claude/check-rust-ci-permissions-N7fhf
Dec 25, 2025
Merged

feat: add CI check for executable permissions on shell scripts#62
DeveloperC286 merged 5 commits into
mainfrom
claude/check-rust-ci-permissions-N7fhf

Conversation

@DeveloperC286
Copy link
Copy Markdown
Owner

Add a new Makefile target and CI workflow job to verify that all shell
scripts in the ci/ directory have executable permissions. This prevents
deployment issues where scripts fail to execute due to missing permissions.

Changes:

  • Added check-ci-scripts-executable target to Makefile.jinja
  • Added ci-scripts-permissions job to continuous-integration.yml workflow
  • Check validates all .sh and .sh.jinja files in ci/ directory
  • Provides clear error message with fix command when permissions are missing

Add a new Makefile target and CI workflow job to verify that all shell
scripts in the ci/ directory have executable permissions. This prevents
deployment issues where scripts fail to execute due to missing permissions.

Changes:
- Added check-ci-scripts-executable target to Makefile.jinja
- Added ci-scripts-permissions job to continuous-integration.yml workflow
- Check validates all .sh and .sh.jinja files in ci/ directory
- Provides clear error message with fix command when permissions are missing
Move the executable permissions check logic from the Makefile into a
dedicated script (ci/check-executable-permissions.sh) for better
maintainability and testability. Also remove the Nix dependency from
the CI workflow since this check only requires basic bash/file operations.

Changes:
- Created ci/check-executable-permissions.sh with the check logic
- Simplified Makefile target to just call the script
- Removed Nix setup from ci-scripts-permissions job
- No dependencies required - runs directly with make

Benefits:
- Faster CI execution (no Nix setup overhead)
- Script can be run independently for testing
- Consistent with other CI scripts (publish-binary.sh, etc.)
Rename all components to use consistent "scripts-permissions" naming:
- Script: check-executable-permissions.sh → check-scripts-permissions.sh
- Makefile target: check-ci-scripts-executable → check-scripts-permissions
- Workflow job: ci-scripts-permissions → scripts-permissions
- Step name: simplified to "Check scripts permissions"

This creates a more consistent and concise naming pattern across the codebase.
Match the style and conventions used by other CI scripts:
- Use #!/usr/bin/env sh instead of bash
- Use long-form flags: set -o errexit, set -o xtrace
- Remove informational echo statements (silent success)
- Keep only error messages for failures
- Use tabs for indentation
- Set file permissions to 755 (rwxr-xr-x)

This ensures consistency across all CI scripts and reduces noise in output.
Simplify the permissions check script:
- Remove all echo statements (silent output, only xtrace)
- Use clearer variable name: exit_code instead of failed
- Only check .sh files, skip .sh.jinja files
- Exit directly with the exit code

The script now relies on set -o xtrace for debugging output and
exits silently with code 0 on success or 1 on failure.
@DeveloperC286 DeveloperC286 force-pushed the claude/check-rust-ci-permissions-N7fhf branch from ac94148 to 9a93816 Compare December 25, 2025 16:46
@DeveloperC286 DeveloperC286 merged commit 0cb9eca into main Dec 25, 2025
7 checks passed
@DeveloperC286 DeveloperC286 deleted the claude/check-rust-ci-permissions-N7fhf branch December 25, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants