- All tests passing (
make test-all) - Linter passing (
make lint) - Code formatted (
make fmt-check) - No clippy warnings
- SQL tests passing (
tests/pg_regress/run_tests.sh) - verified, edge cases correctly error
- Update version in
Cargo.toml(e.g.,0.2.0→0.3.0) - Update version in
extension.yaml(for pgxman) - Update source URL in
extension.yamlto point to new tag - Note:
a5pg.controluses@CARGO_VERSION@template (auto-updated by pgrx) - Regenerate SQL schema:
make schema(updatessql/a5pg--<version>.sql) - Update
README.mdif version mentioned - Update
Makefileschema target if hardcoded version
- Create
CHANGELOG.mdwith:- Breaking changes (removed hex strings, renamed functions)
- New features
- Bug fixes (cell ID 0 deadlock fix)
- Migration guide
- Review
README.mdfor accuracy - Update any version-specific examples
- Regenerate SQL schema (current
sql/a5pg--0.2.0.sqlhas correct function names):make schema # Uses PG_VERSION=17 by default # OR manually: cargo pgrx schema pg17 2>/dev/null > sql/a5pg--0.2.0.sql
- Verify SQL schema has correct function names (no
_idsuffixes) - SQL schema is clean (no ANSI color codes)
- Build release binaries (optional, for distribution):
cargo build --release --no-default-features --features pg15 cargo build --release --no-default-features --features pg16 cargo build --release --no-default-features --features pg17
- Verify
.so/.dylibfiles are generated correctly
- Run full test suite:
make test-all # Tests pg15, pg16, pg17 - Test installation on clean PostgreSQL instances
- Test upgrade path from previous version (if applicable)
- Verify all SQL functions work correctly
git checkout -b release/v<version>- Edit
Cargo.toml:version = "<version>" - Note:
a5pg.controlwill auto-update via@CARGO_VERSION@template
- Update
versionfield inextension.yaml - Update
sourceURL to point to new tag (e.g.,v0.3.0) - Ensure all build steps are correct
# Current SQL file has old function names - MUST regenerate!
make schema
# This generates: sql/a5pg--<version>.sql# Changelog
All notable changes to this project will be documented in this file.
## [0.2.0] - 2024-XX-XX
### Breaking Changes
- **Removed hex string support**: All functions now use `bigint` cell IDs
- **Renamed functions**: Dropped `_id` suffix from all function names
- `a5_lonlat_to_cell_id` → `a5_lonlat_to_cell`
- `a5_cell_to_lonlat_id` → `a5_cell_to_lonlat`
- `a5_cell_to_boundary_id` → `a5_cell_to_boundary`
- `a5_point_to_cell_id` → `a5_point_to_cell`
### Fixed
- Fixed deadlock issue when handling cell ID 0 (WORLD_CELL)
- Functions now return immediately for cell ID 0 without calling library
### Changed
- Function names now match DuckDB a5 extension API
- All functions use native PostgreSQL types (bigint, arrays) instead of strings
### Migration Guide
If upgrading from 0.1.0:
1. Update all function calls to remove `_id` suffix
2. Replace hex string cell IDs with bigint values
3. Use `a5_lonlat_to_cell()` to convert coordinates to cell IDs
## [0.1.0] - 2024-XX-XX
### Added
- Initial release
- Core A5 spatial indexing functions# Run all tests
make test-all
# Verify linting
make lint
# Check formatting
make fmt-check
# Test SQL schema installation
psql -d testdb -f sql/a5pg--<version>.sqlgit add .
git commit -m "chore: release v<version>"
git tag -a v<version> -m "Release v<version>"git push origin release/v<version>
git push origin v<version>- Go to GitHub repository → Releases → Draft a new release
- Tag:
v<version> - Title:
Release v<version> - Description: Copy from CHANGELOG.md
- Mark as "Latest release" if this is the newest version
- Ensure
extension.yamlis up to date with correct version and source URL - Submit/update PR to pgxman buildkit repository:
- PR: pgxman/buildkit#112
- This makes the extension available via
pgxman install a5pg
- Wait for PR approval and merge
- Add PostgreSQL extension documentation to Felix Palmer's a5 repository:
- Repository: https://github.com/felixpalmer/a5
- Document a5pg as a PostgreSQL implementation of the A5 DGGS
- Include installation instructions and usage examples
- Link to this repository for full documentation
git checkout main
git merge release/v<version>
git push origin main# Verify package
cargo package --dry-run
# Publish
cargo publishSave as scripts/release.sh:
#!/bin/bash
set -e
VERSION=$1
if [ -z "$VERSION" ]; then
echo "Usage: $0 <version>"
exit 1
fi
echo "🚀 Preparing release v$VERSION"
# Update Cargo.toml
echo "📝 Updating Cargo.toml..."
sed -i '' "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml
# Regenerate SQL schema
echo "📄 Generating SQL schema..."
make schema
# Run tests
echo "🧪 Running tests..."
make test-all
# Check linting
echo "🔍 Checking linting..."
make lint
# Commit
echo "💾 Committing changes..."
git add .
git commit -m "chore: release v$VERSION" || echo "No changes to commit"
# Tag
echo "🏷️ Creating tag..."
git tag -a v$VERSION -m "Release v$VERSION"
echo ""
echo "✅ Release v$VERSION prepared!"
echo ""
echo "Next steps:"
echo " 1. Review changes: git diff HEAD~1"
echo " 2. Push branch: git push origin release/v$VERSION"
echo " 3. Push tag: git push origin v$VERSION"
echo " 4. Create GitHub release at: https://github.com/<org>/a5pg/releases/new"- ✅ Code refactored (removed hex strings, renamed functions)
- ✅ Tests updated and passing
- ✅ Documentation updated (README.md, CHANGELOG.md)
- ✅ SQL schema regenerated (
sql/a5pg--0.2.0.sqlwith correct function names, no ANSI codes) - ✅ Version updated to 0.3.0
- ✅ Makefile updated
- ✅ Extension.yaml updated with version 0.3.0
- ✅ pgxman buildkit PR: pgxman/buildkit#112
- ⏳ Pending: Add documentation to official a5 repo (https://github.com/felixpalmer/a5)
- ✅ All pre-release checks complete
All pre-release tasks are complete. Next steps:
-
Commit changes:
git add . git commit -m "chore: release v0.3.0"
-
Create tag:
git tag -a v0.3.0 -m "Release v0.3.0" -
Push to GitHub:
git push origin main git push origin v0.3.0
-
Create GitHub Release:
- Go to: https://github.com/decision-labs/a5pg/releases/new
- Tag:
v0.3.0 - Title:
Release v0.3.0 - Description: Copy from
CHANGELOG.md - Mark as "Latest release"
-
Update pgxman Buildkit PR (if needed):
- PR: pgxman/buildkit#112
- Ensure
extension.yamlin the PR matches the current version (0.3.0) - Update source URL to point to v0.3.0 tag
-
Add Documentation to Official a5 Repo (pending):
- Repository: https://github.com/felixpalmer/a5
- Add PostgreSQL extension documentation
- Include installation and usage examples
- Link to this repository for full documentation
- PostgreSQL extension versioning follows the pattern:
a5pg--<version>.sql - The
--separator is required by PostgreSQL - Version should follow semantic versioning (MAJOR.MINOR.PATCH)
- Breaking changes should increment MAJOR version (0.1.0 → 0.2.0 for this release)
a5pg.controluses@CARGO_VERSION@template - pgrx handles this automatically- Test on all supported PostgreSQL versions (15, 16, 17) before release