Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6394c0b
refactor(chore): consolidate testing in Makefiles, move watch to common
minademian Nov 2, 2025
6ea91d8
docs: update docset
minademian Nov 2, 2025
096e8b6
chore: remove
minademian Nov 2, 2025
673651e
docs: move to private docs
minademian Nov 2, 2025
673bde9
style: remove superfluous comment
minademian Nov 2, 2025
59b0c1f
feat(test): passing tests after refactor
minademian Nov 2, 2025
0813841
refactor: moved to root lib/
minademian Nov 2, 2025
3ad1ae0
style: cleanup
minademian Nov 2, 2025
94caf42
test: passing tests
minademian Nov 2, 2025
396764f
refactor: cleaner but not working yet
minademian Nov 2, 2025
2dcc314
refactor: substantial
minademian Nov 2, 2025
bb74a75
fix: nasty bugs
minademian Nov 2, 2025
b3a1f55
chore: for debug
minademian Nov 2, 2025
15c51dd
fix: nasty bug with set euo pipefail and arrays
minademian Nov 2, 2025
78836f8
refactor(fix): move sourcing up the tree
minademian Nov 2, 2025
5f45f1d
docs(style): cleanup and bump ver
minademian Nov 2, 2025
61f894e
docs(style): cleanup and bump ver
minademian Nov 2, 2025
c455fd4
refactor(fix): really good catch by Copilot
minademian Nov 2, 2025
6b5c76d
Update lib/logging.sh
minademian Nov 2, 2025
14ffb48
Update diff-check/lib/reports.sh
minademian Nov 2, 2025
b8c4bce
Update diff-check/lib/git.sh
minademian Nov 2, 2025
c66817d
Update diff-check/lib/git.sh
minademian Nov 2, 2025
9b815e7
Update diff-check/lib/reports.sh
minademian Nov 2, 2025
5ad04d8
Update diff-check/diff-check.sh
minademian Nov 2, 2025
0a62942
Merge branch 'refactor/beta-prep-for-release' of github-personal-2025…
minademian Nov 2, 2025
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ reports/
docs/_build/
docs/.doctrees/
site/
SETUP_COMPLETE.md
docs/internal/
lint-usage-guide.md
MIGRAT*.md

Expand Down
79 changes: 31 additions & 48 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
.PHONY: help build test test-unit test-integration test-watch lint install install-deps clean release
# Makefile.common - Shared Makefile targets for all utilities

include Makefile.common

.PHONY: test test-unit test-integration coverage coverage-unit coverage-integration
.PHONY: watch watch-unit watch-integration watch-all badge clean help test-shared-lib watch-shared-lib

# Default target
.DEFAULT_GOAL := help

## help: Display this help message
help:
@echo "Server Utilities - Makefile Commands"
@echo ""
Expand All @@ -12,7 +16,6 @@ help:
@echo "Available targets:"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'

## build: Build all utilities
build:
@echo "Building all utilities..."
@for dir in */; do \
Expand All @@ -23,42 +26,6 @@ build:
done
@echo "✅ Build complete"

## test: Run all tests (unit + integration)
test:
@echo "Running all tests..."
@for dir in */; do \
if [ -f "$$dir/Makefile" ]; then \
echo "Testing $$dir..."; \
$(MAKE) -C "$$dir" test || exit 1; \
fi \
done
@echo "✅ All tests passed"

## test-unit: Run unit tests only
test-unit:
@echo "Running unit tests..."
@for dir in */; do \
if [ -f "$$dir/Makefile" ]; then \
$(MAKE) -C "$$dir" test-unit || exit 1; \
fi \
done
@echo "✅ Unit tests passed"

## test-integration: Run integration tests only
test-integration:
@echo "Running integration tests..."
@for dir in */; do \
if [ -f "$$dir/Makefile" ]; then \
$(MAKE) -C "$$dir" test-integration || exit 1; \
fi \
done
@echo "✅ Integration tests passed"

## test-watch: Run tests in watch mode
test-watch:
@echo "Starting test watcher..."
@./tests/watch.sh

## lint: Run linters (shellcheck, etc.) - Usage: make lint [MODULE=module-name]
lint:
@if [ -n "$(MODULE)" ]; then \
Expand All @@ -85,7 +52,6 @@ lint:
echo "✅ Linting complete"; \
fi

## install: Install all utilities to system
install:
@echo "Installing utilities..."
@for dir in */; do \
Expand All @@ -96,7 +62,6 @@ install:
done
@echo "✅ Installation complete"

## install-deps: Install development dependencies
install-deps:
@echo "Installing development dependencies..."
@command -v shellcheck >/dev/null 2>&1 || { \
Expand All @@ -123,7 +88,6 @@ install-deps:
}
@echo "✅ Dependencies installed"

## clean: Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
@for dir in */; do \
Expand All @@ -135,7 +99,6 @@ clean:
@find . -name "*.tmp" -delete
@echo "✅ Clean complete"

## release: Create a new release (requires VERSION variable)
release:
@if [ -z "$(VERSION)" ]; then \
echo "Error: VERSION not specified"; \
Expand All @@ -147,7 +110,6 @@ release:
@git push origin "v$(VERSION)"
@echo "✅ Release v$(VERSION) created"

## coverage: Generate test coverage report
coverage:
@echo "Generating coverage reports..."
@for dir in */; do \
Expand All @@ -157,27 +119,48 @@ coverage:
done
@echo "✅ Coverage reports generated"

## docs: Generate documentation
docs:
@echo "Generating documentation..."
@echo "Documentation is in README.md files"
@echo "✅ Documentation complete"

## format: Format code
format:
@echo "Formatting code..."
@find . -name "*.sh" -not -path "*/\.*" -not -path "*/node_modules/*" -exec shfmt -w {} +
@echo "✅ Formatting complete"

## security: Run security checks
security:
@echo "Running security checks..."
@echo "Checking for common security issues..."
@find . -name "*.sh" -not -path "*/\.*" -exec grep -Hn "eval" {} + || true
@echo "✅ Security check complete"

## update: Update dependencies
update:
@echo "Updating dependencies..."
@git pull origin main
@echo "✅ Dependencies updated"

test-shared-lib:
@echo "Running shared library tests..."
@if [ -d "tests/lib" ]; then \
for test_file in tests/lib/test_*.sh; do \
if [ -f "$$test_file" ]; then \
echo "Running $$(basename $$test_file)..."; \
bash "$$test_file" || exit 1; \
fi \
done; \
echo "✅ All shared library tests passed"; \
else \
echo "⚠️ tests/lib/ directory not found"; \
exit 1; \
fi

watch-shared-lib:
@echo "Starting test watcher for shared libraries..."
@if [ -f "tests/watch.sh" ]; then \
./tests/watch.sh shared-lib; \
else \
echo "Error: tests/watch.sh not found"; \
exit 1; \
fi

36 changes: 36 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
test:
@echo "Running all tests..."
@for dir in */; do \
if [ -f "$$dir/Makefile" ]; then \
echo "Testing $$dir..."; \
$(MAKE) -C "$$dir" test || exit 1; \
fi \
done
@echo "✅ All tests passed"

test-unit:
@echo "Running unit tests..."
@for dir in */; do \
if [ -f "$$dir/Makefile" ]; then \
$(MAKE) -C "$$dir" test-unit || exit 1; \
fi \
done
@echo "✅ Unit tests passed"

test-integration:
@echo "Running integration tests..."
@for dir in */; do \
if [ -f "$$dir/Makefile" ]; then \
$(MAKE) -C "$$dir" test-integration || exit 1; \
fi \
done
@echo "✅ Integration tests passed"

test-watch:
@if [ -f "tests/watch.sh" ]; then \
echo "Starting test watcher..."; \
./tests/watch.sh; \
else \
echo "Error: tests/watch.sh not found"; \
exit 1; \
fi
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

A collection of server utilities for DevOps, SRE, and infrastructure teams.

## 📦 Available Utilities
## Available Utilities

| Utility | Description | Distribution | Status |
| ------------------------------ |--------------------------------------------------------------------------------| --------------- |-----------|
| [server-audit](./server-audit) | Modular server auditing tool for binary version checking and system inspection | Homebrew, Maven | 🛠️ Alpha |
| [diff-check](./diff-check) | Git-based file difference checker for configuration drift detection | Homebrew | 🛠️ Alpha |

## 🚀 Quick Start
## Quick Start

### Installation

Expand Down Expand Up @@ -42,16 +42,22 @@ cd server-utilities
make install
```

## 📚 Documentation
## Documentation

Each utility maintains its own comprehensive documentation:

- **[server-audit](./server-audit/README.md)** - Server audit tool for checking installed binaries and configurations
- **[diff-check](./diff-check/README.md)** - Git-based file difference checker for configuration drift detection

For general contribution guidelines, security policies, and community standards, see the links below.
### Project Documentation

## 🏗️ Architecture
- **[Roadmap](./ROADMAP.md)** - Future features and planned releases
- **[Contributing](./CONTRIBUTING.md)** - Contribution guidelines
- **[Security Policy](./SECURITY.md)** - Security policies and vulnerability reporting

For general contribution guidelines, security policies, and community standards, see the links above.

## Architecture

This repository follows a monorepo structure where each directory represents an independently versioned and distributable utility:

Expand All @@ -75,7 +81,7 @@ server-utilities/
4. **Extensibility**: Pluggable architecture for custom extensions
5. **Zero Trust**: Explicit configuration required, safe defaults

## 🔧 Development
## Development

### Prerequisites

Expand Down Expand Up @@ -127,7 +133,7 @@ Each utility follows these conventions:
- `docs/` - Additional documentation and assets
- `lib/` - Core implementation files

## 🤝 Contributing
## Contributing

We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:

Expand All @@ -147,13 +153,13 @@ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.
6. Push to your fork (`git push origin feature/amazing-feature`)
7. Open a Pull Request

## 🔒 Security
## Security

Security is a top priority. If you discover a security vulnerability, please follow our [Security Policy](SECURITY.md).

**Do not** open public issues for security vulnerabilities.

## 📋 Requirements
## Requirements

### Minimum Requirements

Expand All @@ -167,27 +173,27 @@ Security is a top priority. If you discover a security vulnerability, please fol
- **Docker**: For containerized deployments
- **GitHub CLI**: For automated release workflows

## 📊 Project Status
## Project Status

This project is actively maintained and used in production environments. See individual utility documentation for specific stability guarantees.

- **Maintenance Status**: 🟢 Active
- **Support**: Community-driven with commercial support available
- **Release Cadence**: Monthly feature releases, weekly patches as needed

## 📜 License
## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

### Third-Party Licenses

All dependencies and their licenses are documented in [THIRD_PARTY_NOTICES](THIRD_PARTY_NOTICES.md).

## 🙏 Acknowledgments
## Acknowledgments

- Built with production needs in mind

## 📞 Support & Community
## Support & Community

- **Issues**: [GitHub Issues](https://github.com/minademian/server-utilities/issues)
- **Discussions**: [GitHub Discussions](https://github.com/minademian/server-utilities/discussions)
Expand All @@ -201,11 +207,11 @@ All dependencies and their licenses are documented in [THIRD_PARTY_NOTICES](THIR
4. Ask in [Discussions](https://github.com/minademian/server-utilities/discussions)
5. Open a new issue with the appropriate template

## 🗺️ Roadmap
## Roadmap

See [ROADMAP.md](ROADMAP.md) for planned features and utilities.

## 🔄 Versioning
## Versioning

We use [Semantic Versioning](https://semver.org/) (SemVer) for all utilities:

Expand All @@ -215,7 +221,7 @@ We use [Semantic Versioning](https://semver.org/) (SemVer) for all utilities:

Each utility maintains its own version independently.

## 💼 Commercial Support
## Commercial Support

Enterprise support, custom feature development, and SLA guarantees available upon request.

Expand Down
Loading