1.7 KiB
1.7 KiB
Update an existing nix extension
- Create a branch off of
develop - For instance, if we were updating https://github.com/supabase/postgres/blob/develop/nix/ext/supautils.nix we would:
- change the
version = "2.2.1";to whatever our git tag release version is that we want to update to - temporarily empty the
hash = "sha256-wSUEG0at00TPAoHv6+NMzuUE8mfW6fnHH0MNxvBdUiE=";tohash = "";and savesupautils.nixandgit add . - run
nix build .#psql_15/exts/supautilsor the name of the extension to update, nix will print the calculated sha256 value that you can add back the thehashvariable, save the file again, and re-run nix build .#psql_15/exts/supautils. - NOTE: This step is only necessary for
buildPgrxExtensionpackages, which includes supabase-wrappers, pg_jsonschema, and pg_graphql. Otherwise you can skip this step. For our packages that are build withbuildPgrxExtensionyou will need to prepend the previous version to thepreviousVersionsvariable before updating the version in the package (for instance if you are updatingsupabase-wrappersextension from0.4.1to0.4.2then you would prepend0.4.1to this line https://github.com/supabase/postgres/blob/develop/nix/ext/wrappers/default.nix#L18 ). - Add any needed migrations into the
supabase/postgresmigrations directory - update the version in
ansible/vars.ymlas usual - You can then run the
nix flake check -Ltests locally to verify that the update of the package succeeded. - Now it's ready for PR review.
- 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.
- change the