drop profile directory change on CARGO_PKG_VERSION_PATCH update

This commit is contained in:
yggverse 2024-10-11 22:35:03 +03:00
parent 53a18acbc5
commit 32d1701fc6
2 changed files with 6 additions and 2 deletions

View File

@ -109,7 +109,7 @@ Guide and protocol draft
### Releases
* Package version in repository should be increased immediately after stable release on [crates.io](https://crates.io/crates/yoda) and before apply new changes
* Currently, profile data stored in separated sub-directory, for every new release version
* Currently, profile data stored in separated sub-directories, auto-created on every `CARGO_PKG_VERSION_MAJOR` or/and `CARGO_PKG_VERSION_MINOR` change
## See also

View File

@ -19,7 +19,11 @@ fn main() -> ExitCode {
profile_path.push(VENDOR);
profile_path.push(APP_ID);
profile_path.push(BRANCH);
profile_path.push(env!("CARGO_PKG_VERSION")); // @TODO remove after auto-migrate feature implementation
profile_path.push(format!(
"{}.{}",
env!("CARGO_PKG_VERSION_MAJOR"),
env!("CARGO_PKG_VERSION_MINOR")
)); // @TODO remove after auto-migrate feature implementation
if let Err(e) = create_dir_all(&profile_path) {
panic!("Failed to create profile directory: {e}")