Skip to content

spur 0.2.0

Choose a tag to compare

@Danrley-Ruan-Saquetti Danrley-Ruan-Saquetti released this 28 Sep 12:54
· 16 commits to master since this release
a8204c3

0.2.0 - 2026-09-28

New ways to read a Spurfile without running it, sections in spur list, and a round of fixes from the branch review. The runner is still one file that depends on sh, awk, dirname, basename and cat, and nothing else — now pinned by a test. Everything here landed in #2.

Added

  • ##@ Title lines group the tasks that follow into sections in spur list.
  • --check syntax-checks every task, or just one (spur --check deploy), without running anything, and reports what is malformed, including a heredoc that is never terminated.
  • --names prints the bare task names, one per line, for scripts and shell completion.
  • spur --describe <task> prints a task's long help (its ## block).
  • An unknown task suggests the closest task names, and suggests no unrelated name for a short one.

Fixed

  • SPUR_BIN resolves to ./spur when the runner is started as sh spur.
  • -f and -C are kept in the hints printed after an error, so the suggested command works as printed.
  • ### lines stay out of a task's long help.
  • The caller's environment is no longer overwritten by the runner's own variables: every runner variable is now prefixed spur_ or SPUR_, and exec-caller-environment-kept scans the runner to keep it that way.
  • --check parses the preamble once and assembles without subshells.

Tests, benchmarks and CI

  • tests/run.sh runs the cases in parallel workers (SPUR_TEST_JOBS, default the number of CPUs) and reports in alphabetical order. SPUR_TEST_TIMES=1 times each case and lists the five slowest, SPUR_TEST_AWK chooses the awk the runner runs with, and Ctrl-C or TERM stops the workers cleanly, a second signal included under bash 3.2.
  • A benchmark harness, tests/bench/run.sh, with six scenarios. It prints min, mean and max per scenario, with no baseline and no threshold.
  • The suite grew from 48 to 114 cases, adding tab dedent, CRLF, -C with -f, empty bodies, nearest-Spurfile discovery, multi-line preambles, digits and underscore in task names, and exec-minimal-path.
  • CI pins shellcheck to 0.11.0, adds macOS (bash 3.2, BSD awk), runs the suite under dash once per awk (gawk --posix, mawk, original-awk) and runs every benchmark once.

Install

curl -fsSL https://raw.githubusercontent.com/esliph/spur/v0.2.0/spur \
  -o ~/.local/bin/spur && chmod +x ~/.local/bin/spur

Upgrading from 0.1.0 is the same command. Or download spur from the assets below and chmod +x it, or vendor it by copying the file into your repository.