Skip to content

Commit

Permalink
Update to 2025.2.0 (switch to CalVer from SemVer) (#286)
Browse files Browse the repository at this point in the history
- Update to 2025.2.0, the first CalVer release
- Update to rust 1.85 and 2024 edition
- Add "update-flake" recipe
- Add @uncenter to community thanks

Signed-off-by: Nick Gerace <nickagerace@gmail.com>
  • Loading branch information
nickgerace authored Feb 28, 2025
1 parent b371b18 commit f79b87c
Show file tree
Hide file tree
Showing 14 changed files with 286 additions and 225 deletions.
218 changes: 32 additions & 186 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
<YYYY>.<MM>.<RELEASE-NUMBER>
```

- 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 `<prefix>/gfold/gfold.json` to `<prefix>/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).
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "gfold"
version = "4.6.0"
version = "2025.2.0"

authors = ["Nick Gerace <nickagerace@gmail.com>"]
categories = ["command-line-utilities", "command-line-interface"]
description = "CLI tool to help keep track of your Git repositories."
edition = "2021"
edition = "2024"
homepage = "https://github.com/nickgerace/gfold"
keywords = ["git", "cli"]
license = "Apache-2.0"
Expand Down
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,24 @@
[![latest release tag](https://img.shields.io/github/v/tag/nickgerace/gfold?sort=semver&logo=git&logoColor=white&label=version&style=for-the-badge&color=blue)](https://github.com/nickgerace/gfold/releases/latest)
[![crates.io version](https://img.shields.io/crates/v/gfold?style=for-the-badge&logo=rust&color=orange)](https://crates.io/crates/gfold)
[![build status](https://img.shields.io/github/actions/workflow/status/nickgerace/gfold/ci.yml?branch=main&style=for-the-badge&logo=github&logoColor=white)](https://github.com/nickgerace/gfold/actions)
[![calver](https://img.shields.io/badge/calver-YYYY.MM.MICRO-cyan.svg?style=for-the-badge)](https://calver.org)
[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)

`gfold` is a CLI tool that helps you keep track of multiple Git repositories.

[![A GIF showcasing gfold in action](https://raw.githubusercontent.com/nickgerace/gfold/main/assets/demo.gif)](https://raw.githubusercontent.com/nickgerace/gfold/main/assets/demo.gif)

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.
Expand Down Expand Up @@ -44,6 +55,9 @@ gfold /this/is/an/absolute/path

# Operate with a relative path.
gfold ../../this/is/a/relative/path

# Operate with three paths.
gfold ~/src ~/projects ~/code
```

### Config File
Expand Down Expand Up @@ -190,21 +204,13 @@ Please [file an issue](https://github.com/nickgerace/gfold/issues) if your platf

## Troubleshooting and Known Issues

If you encounter unexpected behavior or a bug and would like to see more details, please run `gfold` with the following
environment variables:
If you encounter unexpected behavior or a bug and would like to see more details, please run with increased verbosity.

```shell
# You may also want to add relevant arg(s) and flag(s).
RUST_BACKTRACE=1 RUST_LOG=debug gfold
gfold -vvv
```

If the issue persists, please [file an issue](https://github.com/nickgerace/gfold/issues).

### Tuning Environment Variables

Since [`RUST_BACKTRACE`](https://doc.rust-lang.org/std/backtrace/index.html) and
[`RUST_LOG`](https://docs.rs/env_logger/latest/env_logger/) do not have `gfold`-specific behaviors, you can adjust
them just as you would in other projects to aid investigation.
Please attach relevant logs from execution with _sensitive bits redacted_ in order to help resolve your issue.

### Coreutils Collision on macOS
Expand Down
Loading

0 comments on commit f79b87c

Please sign in to comment.