Closed kwaa closed 2 weeks ago
The changes introduce a refactoring across various components of the codebase to consistently use a single VERSION
constant sourced from hatsu_utils
. This ensures uniformity in how version information is referenced, replacing multiple previous usages of environmental variables for versioning information with the centralized constant.
File Path | Change Summary |
---|---|
crates/api_mastodon/src/entities/instance.rs |
Updated to use VERSION from hatsu_utils for instance version and description fields. |
crates/nodeinfo/src/schema.rs |
Updated to use the VERSION constant from hatsu_utils instead of env!("CARGO_PKG_VERSION") for the version field in NodeInfoSoftware struct. |
crates/utils/src/data.rs |
Modified import statement to include VERSION and replaced env!("CARGO_PKG_VERSION") with VERSION in the info function. |
crates/utils/src/lib.rs |
Added new version.rs module and exposed the VERSION constant. |
crates/utils/src/version.rs |
Introduced a public constant VERSION that retrieves the version from Cargo metadata. |
In lines of code, where constants roam,
A version unified, now called home.
Fromhatsu_utils
, it shines so bright,
Simplifying the code, making it right.
A single source, no more the strife,
For versions speak with a constant life.
🎉 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
VERSION
constant.Refactor
VERSION
constant for more consistent and maintainable code.