mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-11-29 05:57:07 +02: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:
36
ci/script.sh
36
ci/script.sh
@@ -11,17 +11,16 @@ main() {
|
||||
# output of cargo a little trickier. So just wipe it.
|
||||
cargo clean
|
||||
# Test a normal debug build.
|
||||
cargo build --target "${TARGET}" --verbose --all
|
||||
cargo build --target "$TARGET" --verbose --all
|
||||
|
||||
# Show the output of build.rs stderr.
|
||||
# Show the output of the most recent build.rs stderr.
|
||||
set +x
|
||||
find ./target/"$TARGET"/debug -name stderr | while read stderr; do
|
||||
if [ -s "$stderr" ]; then
|
||||
echo "===== $stderr ====="
|
||||
cat "$stderr"
|
||||
echo "====="
|
||||
fi
|
||||
done
|
||||
stderr="$(find "target/$TARGET/debug" -name stderr -print0 | xargs -0 ls -t | head -n1)"
|
||||
if [ -s "$stderr" ]; then
|
||||
echo "===== $stderr ====="
|
||||
cat "$stderr"
|
||||
echo "====="
|
||||
fi
|
||||
set -x
|
||||
|
||||
# sanity check the file type
|
||||
@@ -37,19 +36,16 @@ main() {
|
||||
"$(dirname "${0}")/test_complete.sh"
|
||||
|
||||
# Check that we've generated man page and other shell completions.
|
||||
find ./target/"$TARGET"/debug/build/ripgrep-* -name 'out' | \
|
||||
while read outdir; do
|
||||
file "$outdir/rg.bash"
|
||||
file "$outdir/rg.fish"
|
||||
file "$outdir/_rg.ps1"
|
||||
# man page requires asciidoc, and we only install it on Linux x86.
|
||||
if is_linux; then
|
||||
file "$outdir/rg.1"
|
||||
fi
|
||||
done
|
||||
outdir="$(cargo_out_dir "target/$TARGET/debug")"
|
||||
file "$outdir/rg.bash"
|
||||
file "$outdir/rg.fish"
|
||||
file "$outdir/_rg.ps1"
|
||||
# N.B. man page isn't generated on ARM cross-compile, but we gave up
|
||||
# long before this anyway.
|
||||
file "$outdir/rg.1"
|
||||
|
||||
# Run tests for ripgrep and all sub-crates.
|
||||
cargo test --target "${TARGET}" --verbose --all
|
||||
cargo test --target "$TARGET" --verbose --all
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
Reference in New Issue
Block a user