Skip to content

Conversation

mdqst
Copy link
Contributor

@mdqst mdqst commented Apr 15, 2025

Previously, the read_toml function always read the version from the root Cargo.toml, regardless of the current crate being processed in the loop. This was due to referencing $DIR/Cargo.toml, which pointed to the original working directory before cd into the sub-crate.

Switched to using ./Cargo.toml to correctly read the version from each crate's local Cargo.toml.

Now it properly fetches the version for each submodule instead of reusing the root version.

@mdqst mdqst requested a review from a team as a code owner April 15, 2025 17:24
@niklasad1 niklasad1 requested a review from Copilot April 21, 2025 11:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • scripts/publish.sh: Language not supported

@niklasad1
Copy link
Contributor

Ok, cool basically the issue is that we DIR=$pwd at start-up then using after doing cd foo it's not accurate anymore.

All good thanks for spotting this.

@niklasad1
Copy link
Contributor

@mdqst bonus in this PR would be to remove https://github.com/paritytech/jsonrpsee/blob/master/scripts/publish.sh#L9 as well :)

@mdqst
Copy link
Contributor Author

mdqst commented Apr 21, 2025

@mdqst bonus in this PR would be to remove https://github.com/paritytech/jsonrpsee/blob/master/scripts/publish.sh#L9 as well :)

niklasad1 fixed. now you can merge it. thanks!

@mdqst mdqst requested a review from niklasad1 April 21, 2025 11:41
@niklasad1 niklasad1 changed the title fix: version parsing for sub-crates in loop fix: version parsing in scripts/publish.sh Apr 21, 2025
@niklasad1 niklasad1 merged commit 0b1cb02 into paritytech:master Apr 21, 2025
9 checks passed
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.

2 participants