diff options
author | Andrew Gallant <jamslam@gmail.com> | 2018-02-05 18:45:45 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-02-06 12:07:59 -0500 |
commit | 65539403288c984c5175a612c9519437742fc95c (patch) | |
tree | 056d146f6fc56cd229eb7266a9e46805644ad62a /ci | |
parent | b50ae9a99c46acf40d1c47c2e0ef6947fefbc044 (diff) |
doc: generate man page
This commit uses the recent refactoring for defining flags to
automatically generate a man page. This finally allows us to define the
documentation for each flag in a single place.
The man page is generated on every build, if and only if `asciidoc` is
installed. When generated, it is placed in Cargo's `OUT_DIR` directory,
which is the same place that shell completions live.
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/before_deploy.sh | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh index 35bdc0b1..bef04122 100755 --- a/ci/before_deploy.sh +++ b/ci/before_deploy.sh @@ -20,17 +20,25 @@ mk_tarball() { local gcc_prefix="$(gcc_prefix)" local td="$(mktemp -d)" local name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}" - mkdir -p "$td/$name/complete" - mkdir deployment + local staging="$td/$name" + mkdir -p "$staging/complete" local out_dir="$(pwd)/deployment" - - cp target/$TARGET/release/rg "$td/$name/rg" - "${gcc_prefix}strip" "$td/$name/rg" - cp {doc/rg.1,README.md,UNLICENSE,COPYING,LICENSE-MIT} "$td/$name/" + mkdir -p "$out_dir" + + # Copy the ripgrep binary and strip it. + cp target/$TARGET/release/rg "$staging/rg" + "${gcc_prefix}strip" "$staging/rg" + # Copy the README and licenses. + cp {README.md,UNLICENSE,COPYING,LICENSE-MIT} "$staging/" + # Copy shell completion files. cp \ target/"$TARGET"/release/build/ripgrep-*/out/{rg.bash,rg.fish,_rg.ps1} \ - "$td/$name/complete/" + "$staging/complete/" cp complete/_rg "$td/$name/complete/" + # Copy man page. + cp \ + target/"$TARGET"/release/build/ripgrep-*/out/rg.1 \ + "$td/$name/" (cd "$td" && tar czf "$out_dir/$name.tar.gz" *) rm -rf "$td" |