We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75034d6 commit a7fbe30Copy full SHA for a7fbe30
scripts/pre-commit.sh
@@ -3,7 +3,23 @@
3
export RUSTFLAGS="-Dwarnings"
4
export RUSTDOCFLAGS="--cfg docsrs -Dwarnings"
5
6
+declare -A LOCALDEPS=(
7
+ [hightorrent]="https://github.com/angrynode/hightorrent"
8
+)
9
+
10
set -e
11
+set -x
12
13
+if [[ "$1" = "tag" ]]; then
14
+ # When testing for a tag, we only want to use released versions on crates.io
15
+ cp Cargo.toml Cargo.toml.bak
16
+ sed -ri 's/, ?path ?= ?".*"//' Cargo.toml
17
+else
18
+ # If testing in CI, we want to download the latest main branch of LOCALDEPS
19
+ for dep in ${!LOCALDEPS[@]}; do
20
+ git clone --depth=1 "${LOCALDEPS[${key}]}" ../$dep
21
+ done
22
+fi
23
24
cargo +nightly --version
25
cargo +nightly fmt --check
0 commit comments