Skip to content

Releases: dbohdan/recur

v2.0.4

28 Dec 18:32
Compare
Choose a tag to compare
  • Added ARM64 Windows binaries.
  • Changed the build and the repository structure.
  • Changed the module path to dbohdan.com/recur/v2.

v2.0.1

02 Dec 11:37
Compare
Choose a tag to compare
  • Fixed the lack of option validation after -h/--help and -V/--version.

v2.0.0

01 Dec 12:56
Compare
Choose a tag to compare
  • Minor breaking change in the CLI: recur will process the options -h/--help and -V/--version like other options. This means they must be given before the first positional argument. In version 1.x, these options were special and processed in any position. It was supposed to make help easier to access, but in practice it caused problems more than helped. What this change means is that the option -h in the command recur ls -h used to make recur print help and exit; now -h is passed to ls.
  • Replaced "flag" with "option" in the messages.

v1.1.1

26 Nov 19:45
Compare
Choose a tag to compare
  • Fixed parsing -- in CLI arguments.

v1.1.0

21 Nov 05:51
Compare
Choose a tag to compare
  • Implemented setting the environment variable RECUR_ATTEMPT and RECUR_MAX_ATTEMPTS for the command we run.

v1.0.0

18 Nov 08:51
Compare
Choose a tag to compare
  • Improved the error message for wrong usage.
  • The command-line interface should be considered stable.

v0.9.0

06 Nov 09:55
Compare
Choose a tag to compare
  • CLI:
    • Improved the formatting of the CLI help message.
    • Fixed a bug where the default values were substituted after wrapping long lines in the help message. It resulted in incorrectly wrapped lines.
  • Log:
    • Switched to indenting the -vvv config with tabs.

v0.8.0

28 Oct 08:28
Compare
Choose a tag to compare

Breaking changes to the CLI

The argument syntax has changed. -xbar and --foo=bar are no longer accepted. Please use -x bar and --foo bar. Short flags can also no longer be combined, except for -vv and -vvv. See the technical details below for why this change was made.

Other changes:

  • Removed -n and --tries. You can use either -a or --attempts.
  • Changed the -d/--delay behavior to extend the maximum delay when it is shorter.
  • Increased the default number of attempts from 5 to 10.

Logging improvements

  • Added verbosity level 3 to display internal configuration on startup.
  • Improved duration formatting to remove trailng zeroes and units. 1h0m0s now displays as 1h. Zero durations show as 0 instead of 0s.

Technical details about the CLI

This release introduces a custom argument parser to address issues we had with Kong 1.2.1 (negative numbers treated as flags—alecthomas/kong#315; passthrough passing through a flag as the command—alecthomas/kong#463). After evaluating several Go CLI libraries as potential alternatives, I found that none of them could fully replicate what we did with argparse in Python. The issues with other libraries center around passthrough and a lack of customization (for example, having an easy way to hide a default value). Since our needs are pretty simple—no subcommands or mutual exclusion logic—I came to the conclusion that a custom parser would be more maintainable than working around the limitations of existing libraries.

v0.7.0

26 Oct 19:15
Compare
Choose a tag to compare

This release makes significant breaking changes to the CLI. I plan to limit such changes going forward.

  • CLI:
    • Added a warning in verbose mode when the command starts with -. This is a partial workaround for alecthomas/kong#463.
    • Renamed short flags: attempts from -t to -n and timeout from -w to -t. I believe the new short flags will be easier to remember and pair up better the with long flags. For attempts, I chose -n because -a evokes "all".
    • Made only negative timeouts infinite. A timeout of zero is now instant. This is consistent with the attempt count and may be useful in scripts and for debugging.
    • Changed the arguments that took a number of seconds to take Go duration string (1h2m3s).
  • Log:
    • Started rounding durations.
  • Release:
    • Added macOS binaries.
    • Changed the Windows suffix from i386 to x86 used by Microsoft.

v0.6.1

25 Oct 10:36
Compare
Choose a tag to compare
  • Conditions: fixed command_found being False when the command times out or an unknown error occurs.
  • Added a build script.