Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow generating test rustdoc JSON files without git dependency. #856

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion scripts/regenerate_test_rustdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ dir_is_newer_than_file() {

export CARGO_TARGET_DIR=/tmp/test_crates
RUSTDOC_OUTPUT_DIR="$CARGO_TARGET_DIR/doc"
TOPLEVEL="$(git rev-parse --show-toplevel)"

# Get the top-level directory of the project (the repo):
# - If the user has cloned the git repo, ask git.
# - Otherwise, navigate up relative to this script's path.
# This latter option is useful when building cargo-semver-checks for distribution with NixOS:
# https://github.com/obi1kenobi/cargo-semver-checks/issues/855
TOPLEVEL="$(git rev-parse --show-toplevel 2>/dev/null || cd -- "$(dirname -- "${BASH_SOURCE[0]}" )" &>/dev/null && cd -- .. &>/dev/null && pwd)"
TARGET_DIR="$TOPLEVEL/localdata/test_data"
TOOLCHAIN=

Expand Down
Loading