mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-25 17:21:57 -07:00
ci: update deployment for doc rearrangement
This fixes CI to handle the new documentation files. We also continue to do more cleanup. In particular, we devise a nicer way of detecting the most recent Cargo OUT_DIR by writing a dummy file, and looking for the most recently modified version of that file.
This commit is contained in:
21
ci/utils.sh
21
ci/utils.sh
@@ -2,6 +2,20 @@
|
||||
|
||||
# Various utility functions used through CI.
|
||||
|
||||
# Finds Cargo's `OUT_DIR` directory from the most recent build.
|
||||
#
|
||||
# This requires one parameter corresponding to the target directory
|
||||
# to search for the build output.
|
||||
cargo_out_dir() {
|
||||
# This works by finding the most recent stamp file, which is produced by
|
||||
# every ripgrep build.
|
||||
target_dir="$1"
|
||||
find "$target_dir" -name ripgrep-stamp -print0 \
|
||||
| xargs -0 ls -t \
|
||||
| head -n1 \
|
||||
| xargs dirname
|
||||
}
|
||||
|
||||
host() {
|
||||
case "$TRAVIS_OS_NAME" in
|
||||
linux)
|
||||
@@ -68,3 +82,10 @@ is_linux() {
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
is_osx() {
|
||||
case "$TRAVIS_OS_NAME" in
|
||||
osx) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
Reference in New Issue
Block a user