Skip to content

Commit cd9c3f0

Browse files
authored
docs: flesh out the process for updating a package. (#1186)
* docs: flesh out the process for updating a package. * docs: include bit abvout buildPgrxExtension previousVersions --------- Co-authored-by: Sam Rose <[email protected]>
1 parent cb31a2e commit cd9c3f0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

nix/docs/update-extension.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
2. For instance, if we were updating https://github.com/supabase/postgres/blob/develop/nix/ext/supautils.nix we would:
77
1. change the `version = "2.2.1";` to whatever our git tag release version is that we want to update to
88
2. temporarily empty the `hash = "sha256-wSUEG0at00TPAoHv6+NMzuUE8mfW6fnHH0MNxvBdUiE=";` to `hash = "";` and save `supautils.nix` and `git add .`
9-
3. run `nix build .#psql_15/exts/supautils` or the name of the extension to update, nix will print the calculated sha256 value that you can add back the the `hash` variable, save the file again, and re-run nix build .#psql_15/exts/supautils.
10-
4. Add any needed migrations into the `supabase/postgres` migrations directory
11-
5. You can then run tests locally to verify that the update of the package succeeded.
12-
6. Now it's ready for PR review.
9+
3. run `nix build .#psql_15/exts/supautils` or the name of the extension to update, nix will print the calculated sha256 value that you can add back the the `hash` variable, save the file again, and re-run nix build .#psql_15/exts/supautils.
10+
4. NOTE: This step is only necessary for `buildPgrxExtension` packages, which includes supabase-wrappers, pg_jsonschema, and pg_graphql. Otherwise you can skip this step. For our packages that are build with `buildPgrxExtension` you will need to prepend the previous version to the `previousVersions` variable before updating the version in the package (for instance if you are updating `supabase-wrappers` extension from `0.4.1` to `0.4.2` then you would prepend `0.4.1` to this line https://github.com/supabase/postgres/blob/develop/nix/ext/wrappers/default.nix#L18 ).
11+
5. Add any needed migrations into the `supabase/postgres` migrations directory
12+
6. update the version in `ansible/vars.yml` as usual
13+
7. You can then run the `nix flake check -L` tests locally to verify that the update of the package succeeded.
14+
8. Now it's ready for PR review.
15+
9. Once the PR is approved, if you want the change to go out in a release, update the common-nix.vars.yml file with the new version prior to merging.
1316

1417

0 commit comments

Comments
 (0)