tcdi / plrust

A Rust procedural language handler for PostgreSQL
PostgreSQL License
1.12k stars 32 forks source link

Updates plrust/build to programmatically get pgrx version #381

Closed BradyBonnette closed 1 year ago

BradyBonnette commented 1 year ago

Addresses: https://github.com/tcdi/plrust/issues/377

When plrust goes through a release cycle, occasionally (read: pretty much "almost" every time) we forget to update the hard-coded pgrx version in the plrust/build script due to the fact that our automated release tooling does not consider nor modify the script file. With the changes in this PR, we programmatically get the pgrx version using cargo tree and some unix utils magic so that nobody has to think about updating that value ever again upon release.