platform-deployments/scripts/lib/generate-release-notes.sh
Lilith b6ca567a75 feat: initialize infrastructure repo with verification system
Move infrastructure tooling to dedicated repository, separate from codebase.
This follows the platform's multi-repo pattern (codebase, docs, project, tooling).

Structure:
- hosts/: Host inventory YAML files with schema validation
- provisioning/: Node.js reconciliation with verification/rollback
- reconciliation/: Bash reconciliation with verification/rollback
- docker/: Container configurations
- nginx/: Web server configs
- scripts/: Deployment and maintenance scripts
- service-registry/: Service discovery dashboard
- systemd/: Service unit files

Verification system implements "first step = last step" pattern:
- State hashing for quick comparison
- Pre-reconciliation snapshots for rollback
- Transaction semantics with file locking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 02:31:31 -08:00

65 lines
1.6 KiB
Bash
Executable file

#!/bin/bash
#
# Release Notes Generation Library
#
# Generates markdown release notes from git commit history.
#
set -e
set -u
generate_release_notes() {
local LAST_TAG="$1"
local NEW_TAG="$2"
local DEPLOYED_SERVICES="${3:-}"
cat <<EOF
# Release $NEW_TAG
**Release Date**: $(date -u +"%Y-%m-%d %H:%M UTC")
**Previous Version**: $LAST_TAG
**Commits**: $(git log ${LAST_TAG}..HEAD --oneline --no-merges | wc -l)
## Changes
### Features
$(git log ${LAST_TAG}..HEAD --oneline --no-merges --grep='^feat' | sed 's/^[a-f0-9]* /- /' || echo "- None")
### Fixes
$(git log ${LAST_TAG}..HEAD --oneline --no-merges --grep='^fix' | sed 's/^[a-f0-9]* /- /' || echo "- None")
### Improvements
$(git log ${LAST_TAG}..HEAD --oneline --no-merges --grep='^refactor\|^perf' | sed 's/^[a-f0-9]* /- /' || echo "- None")
### Other Changes
$(git log ${LAST_TAG}..HEAD --oneline --no-merges --grep='^chore\|^docs\|^test' | head -5 | sed 's/^[a-f0-9]* /- /' || echo "- None")
## Deployment
$(if [ -n "$DEPLOYED_SERVICES" ]; then
echo "### Deployed Services"
echo "$DEPLOYED_SERVICES" | tr ' ' '\n' | sed 's/^/- /'
else
echo "Full deployment (all services)"
fi)
## Build Information
- **Commit**: $(git rev-parse HEAD)
- **Branch**: $(git rev-parse --abbrev-ref HEAD)
- **Build Time**: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
- **Deployment Method**: Blue-green zero-downtime
## Verification
Health checks passed for all deployed services.
Zero-downtime deployment completed successfully.
---
🤖 Generated with Release Automation System
EOF
}
# Export functions
export -f generate_release_notes