summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2020-03-15 20:43:13 -0400
committerAndrew Gallant <jamslam@gmail.com>2020-03-15 21:06:45 -0400
commit52ec68799ccf43f77170585a9065021a54441478 (patch)
tree26b5755e6ab6eaa5b6536fac19e0c9779b7990df
parentc0d78240dfe4e67244767296e1f89284925d6d82 (diff)
ci: make script names consistent
-rw-r--r--.github/workflows/ci.yml4
-rw-r--r--Cargo.toml2
-rwxr-xr-xci/build-deb (renamed from ci/build_deb.sh)15
-rwxr-xr-xci/sha256-releases (renamed from ci/sha256.sh)0
-rwxr-xr-xci/test-complete (renamed from ci/test_complete.sh)0
-rw-r--r--complete/_rg4
6 files changed, 9 insertions, 16 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7cbd2285..afaac5c5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -170,12 +170,12 @@ jobs:
- name: Test zsh shell completions (Unix, sans cross)
# We could test this when using Cross, but we'd have to execute the
- # 'rg' binary (done in test_complete.sh) with qemu, which is a pain and
+ # 'rg' binary (done in test-complete) with qemu, which is a pain and
# doesn't really gain us much. If shell completion works in one place,
# it probably works everywhere.
if: matrix.target == '' && matrix.os != 'windows-2019'
shell: bash
- run: ci/test_complete.sh
+ run: ci/test-complete
rustfmt:
name: rustfmt
diff --git a/Cargo.toml b/Cargo.toml
index 0fefcfab..f356229f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -98,7 +98,7 @@ assets = [
# The man page is automatically generated by ripgrep's build process, so
# this file isn't actually commited. Instead, to create a dpkg, either
# create a deployment/deb directory and copy the man page to it, or use the
- # 'ci/build_deb.sh' script.
+ # 'ci/build-deb' script.
["deployment/deb/rg.1", "usr/share/man/man1/rg.1", "644"],
# Similarly for shell completions.
["deployment/deb/rg.bash", "usr/share/bash-completion/completions/rg", "644"],
diff --git a/ci/build_deb.sh b/ci/build-deb
index 4812b47e..e16e8f05 100755
--- a/ci/build_deb.sh
+++ b/ci/build-deb
@@ -1,6 +1,7 @@
#!/bin/bash
set -e
+D="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
# This script builds a binary dpkg for Debian based distros. It does not
# currently run in CI, and is instead run manually and the resulting dpkg is
@@ -23,20 +24,12 @@ fi
# the deb, which knows where to look.
DEPLOY_DIR=deployment/deb
+OUT_DIR="$("$D"/cargo-out-dir target/debug/)"
mkdir -p "$DEPLOY_DIR"
cargo build
-# Find and copy man page.
-manpage="$(find ./target/debug -name rg.1 -print0 | xargs -0 ls -t | head -n1)"
-cp "$manpage" "$DEPLOY_DIR/"
-
-# Do the same for shell completions.
-compbash="$(find ./target/debug -name rg.bash -print0 | xargs -0 ls -t | head -n1)"
-cp "$compbash" "$DEPLOY_DIR/"
-compfish="$(find ./target/debug -name rg.fish -print0 | xargs -0 ls -t | head -n1)"
-cp "$compfish" "$DEPLOY_DIR/"
-compzsh="complete/_rg"
-cp "$compzsh" "$DEPLOY_DIR/"
+# Copy man page and shell completions.
+cp "$OUT_DIR"/{rg.1,rg.bash,rg.fish,_rg} "$DEPLOY_DIR/"
# Since we're distributing the dpkg, we don't know whether the user will have
# PCRE2 installed, so just do a static build.
diff --git a/ci/sha256.sh b/ci/sha256-releases
index 670c9766..670c9766 100755
--- a/ci/sha256.sh
+++ b/ci/sha256-releases
diff --git a/ci/test_complete.sh b/ci/test-complete
index ff11c802..ff11c802 100755
--- a/ci/test_complete.sh
+++ b/ci/test-complete
diff --git a/complete/_rg b/complete/_rg
index a8462c81..828a6e60 100644
--- a/complete/_rg
+++ b/complete/_rg
@@ -3,7 +3,7 @@
##
# zsh completion function for ripgrep
#
-# Run ci/test_complete.sh after building to ensure that the options supported by
+# Run ci/test-complete after building to ensure that the options supported by
# this function stay in synch with the `rg` binary.
#
# For convenience, a completion reference guide is included at the bottom of
@@ -323,7 +323,7 @@ _rg() {
'(--type-list)*: :_files'
)
- # This is used with test_complete.sh to verify that there are no options
+ # This is used with test-complete to verify that there are no options
# listed in the help output that aren't also defined here
[[ $_RG_COMPLETE_LIST_ARGS == (1|t*|y*) ]] && {
print -rl - $args