Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build to avoid git appending -dirty #26147

Closed
jdstrand opened this issue Mar 15, 2025 · 0 comments · Fixed by #26148
Closed

Update build to avoid git appending -dirty #26147

jdstrand opened this issue Mar 15, 2025 · 0 comments · Fixed by #26148
Assignees
Labels

Comments

@jdstrand
Copy link
Contributor

jdstrand commented Mar 15, 2025

I introduced this with the Linux builds by adjusting target-env to change .cargo/config.toml to add and remove rustflags. I can do this a different way so not cause -dirty to be appended.

@jdstrand jdstrand added the v3 label Mar 15, 2025
@jdstrand jdstrand self-assigned this Mar 15, 2025
jdstrand added a commit that referenced this issue Mar 16, 2025
jdstrand added a commit that referenced this issue Mar 16, 2025
We need to both add and remove keys from rustflags, but modifying
.cargo/config.toml in place causes the version string to append -dirty.
Use ci-support that sets CARGO_CONFIG_TOML, then call it to put
./.cargo/config into place (a historic name that is preferred over
./.cargo/config.toml if it exists) and git ignore ./.cargo/config.

References:
- #26147
- https://doc.rust-lang.org/cargo/reference/config.html?highlight=rustflags#hierarchical-structure
jdstrand added a commit that referenced this issue Mar 16, 2025
We need to both add and remove keys from rustflags, but modifying
.cargo/config.toml in place causes the version string to have -dirty
appended to it. Use ci-support that instead creates ./.cargo/config (a
historic filename that is preferred over ./.cargo/config.toml if it
exists) and then git ignore ./.cargo/config.

References:
- #26147
- https://doc.rust-lang.org/cargo/reference/config.html?highlight=rustflags#hierarchical-structure
jdstrand added a commit that referenced this issue Mar 16, 2025
We need to both add and remove keys from rustflags, but modifying
.cargo/config.toml in place causes the version string to have -dirty
appended to it. Use ci-support that instead creates ./.cargo/config (a
historic filename that is preferred over ./.cargo/config.toml if it
exists) and then git ignore ./.cargo/config.

References:
- #26147
- https://doc.rust-lang.org/cargo/reference/config.html?highlight=rustflags#hierarchical-structure
jdstrand added a commit that referenced this issue Mar 16, 2025
We need to both add and remove keys from rustflags, but modifying
.cargo/config.toml in place causes the version string to have -dirty
appended to it. Use ci-support that instead creates ./.cargo/config (a
historic filename that is preferred over ./.cargo/config.toml if it
exists) and then git ignore ./.cargo/config.

References:
- #26147
- https://doc.rust-lang.org/cargo/reference/config.html?highlight=rustflags#hierarchical-structure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant