The primary purpose of this commit is to rectify most problems with
`gsub` (and also `sub` with the `g` option), in particular fix #1425 ('\b'),
fix #2354 (lookahead), and fix #2532 (regex == `"^(?!cd ).*$|^cd "`).
This commit also partly resolves #2148 and resolves #1206 in that
`gsub` no longer loops infinitely; however, because the new `gsub`
depends critically on `match/2`, the behavior when regex == `""` is
sometimes non-standard.
The documentation has been updated to reflect the fact that `sub`
and `gsub` are intended to be regular in the second argument.
Also, `_nwise/1` has been tweaked to take advantage of TCO.
* Release pipeline
* Group CI builds for different OSes into `ci.yml`.
* Add release job to release `jq` when tag is in the format of v*.
* Use `clang` as the only compiler on CI.
* Provide extensible matrix for future cross-compile builds, e.g.
for https://github.com/jqlang/jq/pull/2618.
* Locate bison for Windows build
* Also install flex for Windows build
* Add matrix to test all available GH Actions images
* Enable all tests for Windows
* Run `brew update-reset` when `brew update` fails
`brew update` can fail for "Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!"
Ref: https://github.com/owenthereal/jq/actions/runs/5432314910/jobs/9879266028#step:3:19
* Select gcc binaries to release
* Only enable CI when push to master & tag
* Try out statick build
* No need to enforce the same `AM_INIT_AUTOMAKE` version for MacOS
* Disable static build for ubuntu-20.04
See https://github.com/jqlang/jq/pull/2620#discussion_r1248936822
Specified with `--docdir=<path>`, the `$(docdir)` variable is already
available, and has the same default as what it was being set to.
By specifying it here, it overrides what the `--docdir` option
specifies.