From 87235380fae3933ed3bd01a48774aac18fea4e92 Mon Sep 17 00:00:00 2001 From: Nick Gerace Date: Tue, 4 Feb 2025 01:51:17 -0500 Subject: [PATCH] Update to 2025.2.0 Signed-off-by: Nick Gerace --- CHANGELOG.md | 218 ++++----------------------- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 9 ++ docs/CHANGELOG_PRE_CALVER_POST_V4.md | 211 ++++++++++++++++++++++++++ docs/CHANGELOG_PRE_V4.md | 2 +- docs/COMMUNITY_THANKS.md | 1 + docs/RELEASE.md | 10 +- flake.lock | 6 +- justfile | 8 +- 10 files changed, 264 insertions(+), 205 deletions(-) create mode 100644 docs/CHANGELOG_PRE_CALVER_POST_V4.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 74be5ff..3b9f060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,203 +3,49 @@ - All notable, released changes to this project from a user's perspective will be documented in this file - All changes are from [@nickgerace](https://github.com/nickgerace) unless otherwise specified - The format was inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -- This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) -## 4.6.0 - 2024-12-10 +## Versioning Scheme -### Added +This project follows [CalVer](https://calver.org/) for its versioning scheme, starting with `2025.2.0`. +It used to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html) from the first release through version `4.6.0`. +This versioning approach is both backwards and forwards compatible with Semantic Versioning. -- Add XDG-first user directory lookup using [`user_dirs`](https://github.com/uncenter/user_dirs/blob/193547d1d2f190dbc6fbf9f29a4aa2d4318070db/README.md) +Here is the template for the scheme: -### Changed +``` +.. +``` -- Bump dependencies -- Help message to rely on line wrapping -- Update release binary names for clarity (including fixing the macOS one for the correct architecture) +- The first field, `YYYY`, refers to the year of release, specified via four digits. +- The second field, `MM`, refers to the month of release, specified via one (January through September) or two digits (October through December). +- The third field, `RELEASE-NUMBER`, refers to the release number for the given year and month, starting from `0` and incrementing by one for every release. -## 4.5.1 - 2024-12-09 +Here is an example of a theorhetical first release in January 2025: -### Changed +``` +2025.1.0 +``` -- Bump dependencies +Here is an example of a theorhetical third release in December 2024: -## 4.5.0 - 2024-05-23 +``` +2024.12.2 +``` -### Added +In both examples, the exact day of release did not matter. -- Ability to use the standard display mode, but the results are purely alphabetical and not sorted by repository status +## `2025.2.0` - Tue 04 Feb 2025 -### Changed +- Add "paths" configuration option to allow for multiple paths for `gfold` to execute on from [@uncenter](https://github.com/uncenter) +- Move logging verbosity from an environment variable to a flag +- Deprecate "path" configuration option from [@uncenter](https://github.com/uncenter) +- Polish help message, including its formatting +- Remove unused `strum` dependency +- Slightly reduce binary size by no longer relying on formal error types and unneeded abstractions from a multi-crate workspace (i.e. the repository now contains only one crate, yet again) +- Support `~` and `$HOME` for "paths" configuration option from [@uncenter](https://github.com/uncenter) +- Switch to "CalVer" for versioning scheme (no end user action required) +- Update dependencies -- Bump dependencies +## Before `2025.2.0` -## 4.4.1 - 2023-12-23 - -### Changed - -- Bump dependencies - -## 4.4.0 - 2023-06-26 - -### Changed - -- Bump dependencies - -### Notes - -- Bump the minor version field instead of the patch field because the dependency tree has significantly changed - - Technically, the sole user-facing change is that the external dependencies have been bumped - - For context, `libgfold` was newly introduced and contains the majority of the original `gfold` source code -- Only run CI checks on merge -- Publish and use `libgfold` for the first time -- Split `gfold` into two crates: a library and a binary -- Use cargo workspace dependencies - -## 4.3.3 - 2023-04-07 - -### Changed - -- Bump dependencies - -### Notes - -- Remove `flake.nix` due to lack of use (might return in the future) -- Fix missing `4.3.2` title in the `CHANGELOG` - -## 4.3.2 - 2023-03-09 - -### Changed - -- Bump dependencies - -### Notes - -- Add `flake.nix` for more local development options - -## 4.3.1 - 2023-02-05 - -### Changed - -- Bump dependencies -- Bump LICENSE year - -## 4.3.0 - 2023-02-05 - -### Added - -- Add submodule information to the `json` display mode (i.e. `gfold -d json`) - - This information is not yet accessible in other display modes - -### Changed - -- Bump dependencies - -### Notes - -- Add demo GIF to README -- Performed significant refactor to reduce the usage of "floating" functions - (i.e. ensure functions are members of unit structs at minimum) as well as - remove reliance on a single generic error enum - -## 4.2.0 - 2022-12-21 - -### Changed - -- Add "unknown" status for repositories hitting the `extensions.worktreeconfig` error -- Bump dependencies -- Change "unpushed" color to blue -- Ignore the `extensions.worktreeconfig` error until the corresponding upstream issue is resolved: https://github.com/libgit2/libgit2/issues/6044 - -## 4.1.2 - 2022-12-20 - -### Changed - -- Bump dependencies -- When checking if "unpushed" and attempting to resolve the reference from a short name, ignore the error and assume we need to push - -## 4.1.1 - 2022-12-19 - -### Changed - -- Bump dependencies -- Ensure dependencies have their minor version fields locked - -### Notes - -- This `CHANGELOG` entry was accidentally not included in the `4.1.1` tag - -## 4.1.0 - 2022-10-20 - -- Add debug symbol stripping for `cargo install` users (result: ~79% of the size of `4.0.1`) - -### Changed - -- Bump dependencies -- Change CLI library from `argh` to `clap v4` -- Ensure integration test artifacts exist in the correct location -- Refactor to use `cargo` workspaces, which should unlock the ability to create "scripts" via sub-crates - -### Removed - -- Remove ability to print the version as a single JSON field (combine `-V/--version` with `-d/--display json`) - - Normally, this would necessitate a bump of the "major" field in the version, but `-V/--version` is serializable to JSON (just a string) - -## 4.0.1 - 2022-07-05 - -### Changed - -- Bump dependencies - -## 4.0.0 - 2022-05-10 - -### Added - -- Add [Bors](https://bors.tech/) to avoid merge skew/semantic merge conflicts -- Add color mode option with the following choices: "always", "compatibility" and "never" - - "always": display with rich colors (default) - - "compatibility": display with portable colors - - "never": display with no color -- Add display flag with the following choices: "standard" (or "default"), "json" and "classic" - - "standard" (or "default") and "classic" output options return from the previous release - - "json" output is a new option that displays all results in valid JSON, which is useful for third party applications, plugins, parsers, etc. -- Add documentation comments almost everywhere for `cargo doc` -- Add [git2-rs](https://github.com/rust-lang/git2-rs), which replaces `git` subcommand usage - - Even though `git` subcommands were used over **git2-rs** to reduce binary size, significant speed increases could only be achieved by using the latter - - More consistent behavior since git2-rs can be tested at a locked version -- Add JSON output flag for both version and results printing -- Add roubleshooting section to CLI help -- Add troubleshooting section to README for using `RUST_LOG` and `RUST_BACKTRACE` - -### Changed - -- Change config file location from `/gfold/gfold.json` to `/gfold.toml` -- Change config file type from JSON to TOML -- Change CLI help sections to be divided by headers -- Drastically improve performance by moving from sequential target generation to nested, parallel iterators for target generation -- Modify grey color default to avoid a bug where the `stdout` color is not refreshed within `tmux` when using macOS `Terminal.app` -- Refactor module layout - - `display` now contains its child, `color` - - `report` now contains its child, `target` -- Refactor testing for the entire crate - - All tests have been replaced in favor on one integration test - - The old tests relied on developer's environment, which is highly variable - - The new test creates multiple files, directories, and repositories in the `target` directory to simulate an actual development environment -- Use a harness for the `color` module instead of individual functions - -### Removed - -- Remove debug flag in favor of using `RUST_LOG` -- Remove display of `none` fields for the standard (default) display of result (i.e. now, if an optional field was not found, it is not shown) -- Remove git path option for CLI and config file -- Remove `git` subcommand usage - -### Notes - -- Substantial performance gains should be noticeable in certain scenarios - - Observed range in _loose_ benchmarking "real world" usage: ~1.2x to ~5.1x faster than `gfold 3.0.0` on macOS 12.3.1 - - Binary size has increased, but speed has taken priority for this release -- Using `RUST_LOG` and `RUST_BACKTRACE` should be more helpful when debugging unexpected output, performance or suspected bugs - -## Before 4.0.0 - -Please see [CHANGELOG_PRE_V4](./docs/CHANGELOG_PRE_V4.md). +Please see [CHANGELOG_PRE_CALVER_POST_V4](./docs/CHANGELOG_PRE_CALVER_POST_V4.md). diff --git a/Cargo.lock b/Cargo.lock index 6399416..3dce368 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,7 +283,7 @@ dependencies = [ [[package]] name = "gfold" -version = "4.6.0" +version = "2025.2.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index b53f6c2..d013f05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gfold" -version = "4.6.0" +version = "2025.2.0" authors = ["Nick Gerace "] categories = ["command-line-utilities", "command-line-interface"] diff --git a/README.md b/README.md index cc147f6..6f4bca9 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,15 @@ If you'd prefer to use the classic display mode by default, and avoid setting the flag every time, you can set it in the config file (see **Usage** section). +## Announcement (February 2025) + +All releases now follow the [CalVer](https://calver.org/) versioning scheme, starting with `2025.2.0`. +This change is both forwards and backwards compatible with the [Semantic Versioning](https://semver.org/spec/v2.0.0.html) versioning scheme, which was used from the first release through version `4.6.0`. + +*No end user action is required specifically for the versioning scheme change itself.* + +This announcement will be eventually removed from this [README](./README.md) and will eventually be moved into the [CHANGELOG](./CHANGELOG.md). + ## Description This app displays relevant information for multiple Git repositories in one to many directories. diff --git a/docs/CHANGELOG_PRE_CALVER_POST_V4.md b/docs/CHANGELOG_PRE_CALVER_POST_V4.md new file mode 100644 index 0000000..d92d960 --- /dev/null +++ b/docs/CHANGELOG_PRE_CALVER_POST_V4.md @@ -0,0 +1,211 @@ +# Changelog From Version 4.0.0 to CalVer + +For new changes, please see the current [CHANGELOG](../CHANGELOG.md). + +- All notable, released changes to this project from a user's perspective will be documented in this file +- All changes are from [@nickgerace](https://github.com/nickgerace) unless otherwise specified +- The format was inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +- This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) + +## After 4.6.0 + +Please see [CHANGELOG](../CHANGELOG.md). + +## 4.6.0 - 2024-12-10 + +### Added + +- Add XDG-first user directory lookup using [`user_dirs`](https://github.com/uncenter/user_dirs/blob/193547d1d2f190dbc6fbf9f29a4aa2d4318070db/README.md) from [@uncenter](https://github.com/uncenter) + +### Changed + +- Bump dependencies +- Help message to rely on line wrapping +- Update release binary names for clarity (including fixing the macOS one for the correct architecture) + +## 4.5.1 - 2024-12-09 + +### Changed + +- Bump dependencies + +## 4.5.0 - 2024-05-23 + +### Added + +- Ability to use the standard display mode, but the results are purely alphabetical and not sorted by repository status + +### Changed + +- Bump dependencies + +## 4.4.1 - 2023-12-23 + +### Changed + +- Bump dependencies + +## 4.4.0 - 2023-06-26 + +### Changed + +- Bump dependencies + +### Notes + +- Bump the minor version field instead of the patch field because the dependency tree has significantly changed + - Technically, the sole user-facing change is that the external dependencies have been bumped + - For context, `libgfold` was newly introduced and contains the majority of the original `gfold` source code +- Only run CI checks on merge +- Publish and use `libgfold` for the first time +- Split `gfold` into two crates: a library and a binary +- Use cargo workspace dependencies + +## 4.3.3 - 2023-04-07 + +### Changed + +- Bump dependencies + +### Notes + +- Remove `flake.nix` due to lack of use (might return in the future) +- Fix missing `4.3.2` title in the `CHANGELOG` + +## 4.3.2 - 2023-03-09 + +### Changed + +- Bump dependencies + +### Notes + +- Add `flake.nix` for more local development options + +## 4.3.1 - 2023-02-05 + +### Changed + +- Bump dependencies +- Bump LICENSE year + +## 4.3.0 - 2023-02-05 + +### Added + +- Add submodule information to the `json` display mode (i.e. `gfold -d json`) + - This information is not yet accessible in other display modes + +### Changed + +- Bump dependencies + +### Notes + +- Add demo GIF to README +- Performed significant refactor to reduce the usage of "floating" functions + (i.e. ensure functions are members of unit structs at minimum) as well as + remove reliance on a single generic error enum + +## 4.2.0 - 2022-12-21 + +### Changed + +- Add "unknown" status for repositories hitting the `extensions.worktreeconfig` error +- Bump dependencies +- Change "unpushed" color to blue +- Ignore the `extensions.worktreeconfig` error until the corresponding upstream issue is resolved: https://github.com/libgit2/libgit2/issues/6044 + +## 4.1.2 - 2022-12-20 + +### Changed + +- Bump dependencies +- When checking if "unpushed" and attempting to resolve the reference from a short name, ignore the error and assume we need to push + +## 4.1.1 - 2022-12-19 + +### Changed + +- Bump dependencies +- Ensure dependencies have their minor version fields locked + +### Notes + +- This `CHANGELOG` entry was accidentally not included in the `4.1.1` tag + +## 4.1.0 - 2022-10-20 + +- Add debug symbol stripping for `cargo install` users (result: ~79% of the size of `4.0.1`) + +### Changed + +- Bump dependencies +- Change CLI library from `argh` to `clap v4` +- Ensure integration test artifacts exist in the correct location +- Refactor to use `cargo` workspaces, which should unlock the ability to create "scripts" via sub-crates + +### Removed + +- Remove ability to print the version as a single JSON field (combine `-V/--version` with `-d/--display json`) + - Normally, this would necessitate a bump of the "major" field in the version, but `-V/--version` is serializable to JSON (just a string) + +## 4.0.1 - 2022-07-05 + +### Changed + +- Bump dependencies + +## 4.0.0 - 2022-05-10 + +### Added + +- Add [Bors](https://bors.tech/) to avoid merge skew/semantic merge conflicts +- Add color mode option with the following choices: "always", "compatibility" and "never" + - "always": display with rich colors (default) + - "compatibility": display with portable colors + - "never": display with no color +- Add display flag with the following choices: "standard" (or "default"), "json" and "classic" + - "standard" (or "default") and "classic" output options return from the previous release + - "json" output is a new option that displays all results in valid JSON, which is useful for third party applications, plugins, parsers, etc. +- Add documentation comments almost everywhere for `cargo doc` +- Add [git2-rs](https://github.com/rust-lang/git2-rs), which replaces `git` subcommand usage + - Even though `git` subcommands were used over **git2-rs** to reduce binary size, significant speed increases could only be achieved by using the latter + - More consistent behavior since git2-rs can be tested at a locked version +- Add JSON output flag for both version and results printing +- Add roubleshooting section to CLI help +- Add troubleshooting section to README for using `RUST_LOG` and `RUST_BACKTRACE` + +### Changed + +- Change config file location from `/gfold/gfold.json` to `/gfold.toml` +- Change config file type from JSON to TOML +- Change CLI help sections to be divided by headers +- Drastically improve performance by moving from sequential target generation to nested, parallel iterators for target generation +- Modify grey color default to avoid a bug where the `stdout` color is not refreshed within `tmux` when using macOS `Terminal.app` +- Refactor module layout + - `display` now contains its child, `color` + - `report` now contains its child, `target` +- Refactor testing for the entire crate + - All tests have been replaced in favor on one integration test + - The old tests relied on developer's environment, which is highly variable + - The new test creates multiple files, directories, and repositories in the `target` directory to simulate an actual development environment +- Use a harness for the `color` module instead of individual functions + +### Removed + +- Remove debug flag in favor of using `RUST_LOG` +- Remove display of `none` fields for the standard (default) display of result (i.e. now, if an optional field was not found, it is not shown) +- Remove git path option for CLI and config file +- Remove `git` subcommand usage + +### Notes + +- Substantial performance gains should be noticeable in certain scenarios + - Observed range in _loose_ benchmarking "real world" usage: ~1.2x to ~5.1x faster than `gfold 3.0.0` on macOS 12.3.1 + - Binary size has increased, but speed has taken priority for this release +- Using `RUST_LOG` and `RUST_BACKTRACE` should be more helpful when debugging unexpected output, performance or suspected bugs + +## Before 4.0.0 + +Please see [CHANGELOG_PRE_V4](./CHANGELOG_PRE_V4.md). diff --git a/docs/CHANGELOG_PRE_V4.md b/docs/CHANGELOG_PRE_V4.md index f54b116..cf77b8a 100644 --- a/docs/CHANGELOG_PRE_V4.md +++ b/docs/CHANGELOG_PRE_V4.md @@ -8,7 +8,7 @@ For new changes, please see the current [CHANGELOG](../CHANGELOG.md). ## [After 3.0.0] -Please see [CHANGELOG](../CHANGELOG.md). +Please see [CHANGELOG_PRE_CALVER_POST_V4](./CHANGELOG_PRE_CALVER_POST_V4.md). ## [3.0.0] - 2022-01-06 diff --git a/docs/COMMUNITY_THANKS.md b/docs/COMMUNITY_THANKS.md index 51330c8..f1a342c 100644 --- a/docs/COMMUNITY_THANKS.md +++ b/docs/COMMUNITY_THANKS.md @@ -6,5 +6,6 @@ This document contains "thank you" messages to those who aided or contributed to - [@jrcichra](https://github.com/jrcichra) for adding multi-OS support to the original, early-stage CI pipeline - [@orhun](https://github.com/orhun) for adding `gfold` to the Arch Linux community repository ([current location](https://archlinux.org/packages/extra/x86_64/gfold/)) and for maintaining [the original AUR packages](https://github.com/orhun/PKGBUILDs) - [@shanesveller](https://github.com/shanesveller) for adding `gfold` to nixpkgs ([current location](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/version-management/gfold/default.nix)) +- [@uncenter](https://github.com/uncenter) for [several PRs](https://github.com/nickgerace/gfold/pulls?q=is%3Apr+is%3Aclosed+author%3Auncenter) revitalizing the project - [@wezm](https://github.com/wezm) for featuring `gfold` in the ["One Hundred Rust Binaries"](https://www.wezm.net/v2/posts/2020/100-rust-binaries/page2/) series - [@yaahc](https://github.com/yaahc) for mentoring during an early refactor diff --git a/docs/RELEASE.md b/docs/RELEASE.md index 7adf8ad..336cd42 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -4,11 +4,7 @@ This document contains all information related to release. ## Versioning Scheme -This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -Generally, the versioning scheme looks like the following formats where `X` is an unsigned integer: - -- **Release candidates (RCs):** `X.X.X-rc.X` -- **Full releases:** `X.X.X` +See the [CHANGELOG](../CHANGELOG.md) for more information. ## Checklist @@ -52,11 +48,7 @@ cargo publish - [ ] Download and install the crate: ```shell -# Full releases cargo install --locked gfold - -# Release candidates (RCs) -cargo install --locked --version gfold ``` - [ ] Verify that the [GitHub release](https://github.com/nickgerace/gfold/releases) on the repository's releases page looks correct diff --git a/flake.lock b/flake.lock index 19e6d01..f98d25a 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1738553537, - "narHash": "sha256-HrrsuYIOl14dreCDUsXQGrWxdiU8LPKxcIo759jUk6Q=", + "lastModified": 1738584156, + "narHash": "sha256-y+Hw+NYmqhAXErmrwF3+DKsXyv0qJuyIs87fnBuNFeI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2d31b9476b7c6f5b029e595586b0b112a7ad130b", + "rev": "c96875e768da1b176250c3bd0edce6b4f7b5d4bb", "type": "github" }, "original": { diff --git a/justfile b/justfile index b8bf89d..f5aabcc 100644 --- a/justfile +++ b/justfile @@ -31,13 +31,13 @@ ci: cargo test --all-targets --workspace cargo build --locked --all-targets -# Update dependencies -update: +# Update the nix flake lockfile +update-flake: nix flake update - cargo update -# Run formatter and run baseline lints and checks +# Update deps, run formatter, and run baseline lints and checks prepare: + cargo update cargo fmt cargo check --all-targets --all-features --workspace cargo fix --edition-idioms --allow-dirty --allow-staged