Ignore more paths in increment-cargo-version.sh (#12996)

(cherry picked from commit c1c69ecc34)

Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
mergify[bot]
2020-10-19 23:57:11 +00:00
committed by GitHub
parent dddd0b76f1
commit 9481ee79a8

View File

@ -30,8 +30,20 @@ readCargoVariable() {
echo "Unable to locate $variable in $Cargo_toml" 1>&2
}
# shellcheck disable=2207
Cargo_tomls=($(find . -mindepth 2 -name Cargo.toml -not -path './web3.js/examples/*'))
ignores=(
.cache
.cargo
target
web3.js/examples
)
not_paths=()
for ignore in "${ignores[@]}"; do
not_paths+=(-not -path "*/$ignore/*")
done
# shellcheck disable=2207,SC2068 # Don't want a positional arg if `not-paths` is empty
Cargo_tomls=($(find . -mindepth 2 -name Cargo.toml ${not_paths[@]}))
# shellcheck disable=2207
markdownFiles=($(find . -name "*.md"))