1.8 KiB
1.8 KiB
Contributing to Pulse Installer Scripts
Workflow Overview
- Plan the change (refactor, new feature, bugfix) and confirm whether the shared libraries already support your needs.
- Implement in the modular source file (e.g.,
scripts/install-foo-v2.sh). - Add/Update tests (smoke + integration where applicable).
- Bundle (
make bundle-scripts) and verify outputs. - Document any behavioural changes.
- Submit PR with summary, testing results, and rollout considerations.
Expectations
- Use shared libraries (
scripts/lib/*.sh) instead of duplicating helpers. - Maintain backward compatibility; introduce feature flags when needed.
- Keep legacy script versions until rollout completes.
- Ensure
scripts/tests/run.sh(smoke) and relevant integration tests pass. - Run
make lint-scripts(shellcheck) before submitting. - Update
scripts/bundle.manifestand regenerate bundles. - Provide before/after metrics when refactoring (size reduction, test coverage).
Testing Checklist
scripts/tests/run.shscripts/tests/test-sensor-proxy-http.sh(requires Docker; validates uninstall → HTTP install cycle)- Relevant
scripts/tests/integration/*scripts (add new ones if needed) - Manual
--dry-runinvocation of the script when feasible - Bundle validation:
bash -n dist/<script>.shanddist/<script>.sh --dry-run
Useful Commands
# Lint & format
make lint-scripts
# Run smoke tests
scripts/tests/run.sh
# Run integration tests
scripts/tests/integration/test-<name>.sh
# Rebuild bundles
make bundle-scripts
Resources
docs/script-library-guide.md— detailed patterns and examplesscripts/lib/README.md— library function referencedocs/installer-v2-rollout.md— rollout process for installers- GitHub Discussions / internal Slack for questions