This document provides an overview of all the scripts and tools available for automating GeoDa version updates.
.github/workflows/update-version.yml- Automated workflow triggered by git tags
update-version.sh- Easy-to-use wrapper script with colored outputscripts/update-version.js- Main Node.js script for version updatesscripts/test-version-update.js- Simulation script for testingscripts/validate-json.js- JSON validation script
VERSION_UPDATE_README.md- User guideVERSION_UPDATE_SOLUTION.md- Technical solution documentSCRIPTS_OVERVIEW.md- This overview document
# Create and push a tag
git tag v1.22.0.20
git push origin v1.22.0.20
# GitHub Action will automatically run and create a PR# Test what would be changed
./update-version.sh --dry-run 1.22.0.20 7/31/2025
# Run actual update
./update-version.sh 1.22.0.20 7/31/2025Purpose: User-friendly interface for running version updates locally
Features:
- ✅ Input validation (version format, date format)
- ✅ Prerequisites checking (Node.js, script files)
- ✅ Colored output for better readability
- ✅ Dry run mode for testing
- ✅ Help documentation
- ✅ Error handling and rollback instructions
Usage:
./update-version.sh --help # Show help
./update-version.sh --dry-run 1.22.0.20 # Test changes
./update-version.sh 1.22.0.20 # Run update
./update-version.sh 1.22.0.20 7/31/2025 # Run with custom datePurpose: Core logic for updating version information in JSON files
Features:
- ✅ Automatic backup creation
- ✅ Updates all file types (downloadContent, platform files, nightly)
- ✅ Multi-language support (de, es, zh-Hans)
- ✅ JSON validation
- ✅ Error handling with rollback instructions
- ✅ Progress reporting
Usage:
node scripts/update-version.js 1.22.0.20
node scripts/update-version.js 1.22.0.20 7/31/2025Purpose: Test the update logic without modifying files
Features:
- ✅ Simulates all update operations
- ✅ Shows before/after examples
- ✅ Validates logic correctness
- ✅ No file modifications
Usage:
node scripts/test-version-update.js 1.22.0.20 7/31/2025Purpose: Validate JSON files after updates
Features:
- ✅ Checks JSON syntax
- ✅ Validates version presence in expected locations
- ✅ Checks file structure
- ✅ Reports missing files gracefully
Usage:
node scripts/validate-json.js 1.22.0.20- Trigger: Git tag push
- Environment: GitHub Actions runner
- Implementation: Uses the local
update-version.shscript - Output: Pull request with changes
- Use case: Production releases
- Trigger: Manual execution
- Environment: Local machine
- Output: Direct file changes + backup
- Use case: Testing, development, manual updates
- Repository with GitHub Actions enabled
- Write permissions for creating pull requests
- Git tags in format
vX.Y.Z.W
- Node.js installed
- Bash shell (for wrapper script)
- Repository cloned locally
| File Type | GitHub Action | Local Scripts | Description |
|---|---|---|---|
downloadContent.json |
✅ | ✅ | Updates description + adds release entry |
downloadLinux.json |
✅ | ✅ | Updates current version + moves to history |
downloadMac.json |
✅ | ✅ | Updates current version + moves to history |
downloadWindows.json |
✅ | ✅ | Updates current version + moves to history |
downloadNightly.json |
✅ | ✅ | Adds new release entry |
| Language variants (de/es/zh-Hans) | ✅ | ✅ | Same updates for all languages |
- Fails fast on errors
- Provides detailed logs
- No automatic rollback (manual intervention required)
- Creates automatic backups
- Provides rollback instructions
- Continues processing other files on individual failures
- Shows detailed error messages
- Dry run:
./update-version.sh --dry-run 1.22.0.20 - Simulation:
node scripts/test-version-update.js 1.22.0.20 - Local update:
./update-version.sh 1.22.0.20 - Validation:
node scripts/validate-json.js 1.22.0.20 - Review changes: Check modified files
- Test website: Ensure everything works
- Create tag:
git tag v1.22.0.20 - Push tag:
git push origin v1.22.0.20 - Monitor action: Check GitHub Actions tab
- Review PR: Examine generated pull request
- Merge PR: Approve and merge changes
- Time saving: Reduces manual work from hours to minutes
- Accuracy: Eliminates human errors in version numbers
- Consistency: Ensures uniform updates across all files
- Audit trail: Creates pull requests for review
- Testing: Verify changes before production
- Development: Test new features locally
- Manual updates: Handle special cases
- Backup safety: Automatic backups with rollback
- Invalid version format: Use
X.Y.Z.Wformat (e.g.,1.22.0.20) - Missing Node.js: Install Node.js for local scripts
- Permission errors: Ensure write permissions for local files
- GitHub token issues: Check repository permissions for actions
- Local scripts: Use backup directory to restore files
- GitHub Action: Manually revert changes or re-run action
- Validation errors: Check JSON syntax and file structure
Potential improvements for the scripts:
- Support for different version formats
- Custom date formats
- Additional file types
- Email notifications
- Integration with release notes generation
- Web interface for non-technical users