mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
Release Scripts
This directory contains helper scripts for the automated release process.
Scripts
generate-changelog.sh
Enhanced changelog generator with better formatting and categorization.
Usage:
./generate-changelog.sh <base_branch> <compare_branch>
Example:
./generate-changelog.sh main dev
Features:
- Groups commits by type (features, fixes, mobile, chores, etc.)
- Detects breaking changes
- Links to PRs and commits
- Shows author information
- Generates release statistics
Output: Markdown-formatted changelog
notify-slack.sh
Sends formatted notifications to Slack about release events.
Usage:
SLACK_WEBHOOK_URL="<url>" ./notify-slack.sh <event_type> <version> [additional_info]
Event Types:
release_started- Release initiated and ready for QAqa_approved- Release approved and mergedrelease_published- Release deployed to productionbackmerge_complete- Back-merge completed successfullybackmerge_conflict- Back-merge has conflictsrelease_failed- Release encountered an error
Example:
export SLACK_WEBHOOK_URL="https://hooks.slack.com/..."
./notify-slack.sh release_started "1.74.0"
Environment Variables:
SLACK_WEBHOOK_URL(required) - Slack webhook URLGITHUB_REPOSITORY(optional) - Repository name for linksGITHUB_RUN_ID(optional) - Workflow run ID for links
Integration with GitHub Actions
These scripts are called by the automated release workflows:
-
Start Web Release (
../.github/workflows/web-release-start.yml)- Uses
generate-changelog.shto create PR description - Uses
notify-slack.shto announce release start
- Uses
-
Complete Web Release (
../.github/workflows/web-release-complete.yml)- Uses
notify-slack.shto announce QA approval
- Uses
-
Back-merge Main to Dev (
../.github/workflows/web-release-backmerge.yml)- Uses
notify-slack.shto announce back-merge status
- Uses
Development
Testing Changelog Generation
# Test changelog between branches
./generate-changelog.sh main dev
# Test with different branches
./generate-changelog.sh v1.73.0 release
Testing Slack Notifications
# Test notification (requires webhook URL)
export SLACK_WEBHOOK_URL="your-webhook-url"
./notify-slack.sh release_started "test-version" "Testing notifications"
Making Changes
After modifying scripts:
- Test locally first
- Ensure scripts remain POSIX-compliant
- Update this README if adding new scripts
- Update workflow files if script interfaces change
Troubleshooting
Script not executable
chmod +x generate-changelog.sh
chmod +x notify-slack.sh
Git commands failing
Ensure you're in a git repository and have fetched latest changes:
git fetch --all
Slack notifications not working
- Verify webhook URL is correct
- Test webhook with curl:
curl -X POST "$SLACK_WEBHOOK_URL" \ -H 'Content-Type: application/json' \ -d '{"text":"Test message"}' - Check GitHub Actions secrets/variables configuration
Contributing
When adding new scripts:
- Follow existing naming convention
- Add proper error handling
- Document usage in this README
- Make scripts executable (
chmod +x) - Use
#!/usr/bin/env bashshebang - Add comments for complex logic
See also: Automated Release Procedure