|
| 1 | +# Releasing open_pg_tde |
| 2 | + |
| 3 | +Releases are published on GitHub as one source tarball per supported PostgreSQL |
| 4 | +major version, attached as release assets. Tarballs are build artifacts and are |
| 5 | +not committed to the repository; they are produced from the tagged source by the |
| 6 | +script below. |
| 7 | + |
| 8 | +## Building the source tarballs |
| 9 | + |
| 10 | +```sh |
| 11 | +git submodule update --init # libkmip must be checked out |
| 12 | +ci_scripts/build-source-tarballs.sh dist |
| 13 | +``` |
| 14 | + |
| 15 | +This writes `dist/open_pg_tde-<version>-pg16.tar.gz`, `-pg17.tar.gz`, and |
| 16 | +`-pg18.tar.gz`. Each tarball is a complete source tree that includes: |
| 17 | + |
| 18 | +- the extension source and build files, |
| 19 | +- the `libkmip` submodule contents (which `git archive` does not include on its |
| 20 | + own), and |
| 21 | +- only the `patches/postgresql/<major>/` core patch for that PostgreSQL major. |
| 22 | + |
| 23 | +The version in the file name comes from the `version` field in `meson.build`. |
| 24 | + |
| 25 | +To build from a tarball, apply its core patch to a matching stock PostgreSQL |
| 26 | +source tree with `patches/postgresql/apply.sh`, build PostgreSQL with the hooks |
| 27 | +enabled, and build the extension against that install. See |
| 28 | +`documentation/docs/install-from-source.md`. |
| 29 | + |
| 30 | +## Cutting a release |
| 31 | + |
| 32 | +1. Bump the `version` in `meson.build` (for example `2.2.0` to `2.3.0`). |
| 33 | +2. Add `documentation/docs/release-notes/release-notes-v<version>.md` and list it |
| 34 | + in the `nav` of `documentation/mkdocs.yml`. |
| 35 | +3. Commit the version bump and release notes to `main`. |
| 36 | +4. Tag the release commit and push the tag: |
| 37 | + |
| 38 | + ```sh |
| 39 | + git tag -a <version> -m "open_pg_tde <version>" |
| 40 | + git push origin <version> |
| 41 | + ``` |
| 42 | + |
| 43 | +5. Build the tarballs and their checksums: |
| 44 | + |
| 45 | + ```sh |
| 46 | + ci_scripts/build-source-tarballs.sh dist |
| 47 | + ( cd dist && sha256sum open_pg_tde-<version>-pg*.tar.gz > SHA256SUMS ) |
| 48 | + ``` |
| 49 | + |
| 50 | +6. Create the GitHub release with the tarballs and checksums as assets: |
| 51 | + |
| 52 | + ```sh |
| 53 | + gh release create <version> --repo commandprompt/open_pg_tde \ |
| 54 | + --title "open_pg_tde <version>" \ |
| 55 | + --notes-file dist/RELEASE_BODY.md \ |
| 56 | + dist/open_pg_tde-<version>-pg16.tar.gz \ |
| 57 | + dist/open_pg_tde-<version>-pg17.tar.gz \ |
| 58 | + dist/open_pg_tde-<version>-pg18.tar.gz \ |
| 59 | + dist/SHA256SUMS |
| 60 | + ``` |
| 61 | + |
| 62 | +7. Verify the assets: |
| 63 | + |
| 64 | + ```sh |
| 65 | + gh release view <version> --repo commandprompt/open_pg_tde --json assets |
| 66 | + ``` |
| 67 | + |
| 68 | +Consumers verify a download with `sha256sum -c SHA256SUMS`. |
0 commit comments