Skip to content

Conversation

@syvb
Copy link
Contributor

@syvb syvb commented Sep 21, 2022

We don't use the version number in the extension's Cargo.toml anywhere currently. pgx supports replacing @CARGO_VERSION@ in control files, so use that.

@syvb syvb requested review from WireBaron and epgts September 21, 2022 16:31
Copy link
Contributor

@epgts epgts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pgx supports replacing @CARGO_VERSION@ in control files but we don't use that in our control file.

Interesting. Should we? Would that allow us to have only one place to update the version number and that places is extension/Cargo.toml ? If so, I think I like that.

@WireBaron
Copy link
Contributor

pgx supports replacing @CARGO_VERSION@ in control files but we don't use that in our control file.

Interesting. Should we? Would that allow us to have only one place to update the version number and that places is extension/Cargo.toml ? If so, I think I like that.

The problem is that we still have to update the control file to update the upgrade version, so I'm not sure it buys us that much. Is there anywhere else we can make use of this @CARGO_VERSION@? Let's discuss tomorrow.

@syvb syvb force-pushed the sv/rm-unused-version branch from 7f95081 to 373b597 Compare September 23, 2022 15:39
@syvb syvb changed the title Make unused version number 0.0.0-unused Deduplicate version number Sep 23, 2022
@syvb syvb force-pushed the sv/rm-unused-version branch from 6d45089 to 6531917 Compare September 23, 2022 17:24
The post-install script doesn't need updating since it reads a control
file generated by pgx.
@syvb syvb force-pushed the sv/rm-unused-version branch from 6531917 to 68a8c08 Compare September 23, 2022 17:30
@syvb
Copy link
Contributor Author

syvb commented Sep 23, 2022

I updated the PR to use Cargo.toml as the source for the version number, and updated update-tester to use the new source.

@syvb syvb requested a review from epgts September 23, 2022 17:37
@syvb
Copy link
Contributor Author

syvb commented Sep 26, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 26, 2022

@bors bors bot merged commit 4103469 into main Sep 26, 2022
@bors bors bot deleted the sv/rm-unused-version branch September 26, 2022 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants