Skip to content

Commit

Permalink
add top level check
Browse files Browse the repository at this point in the history
  • Loading branch information
rraval authored and github-actions[bot] committed Dec 14, 2024
1 parent c5a7d66 commit e6f935f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail

toplevel=$(git rev-parse --show-toplevel)
cd "${toplevel}"
if [[ ! -f Cargo.toml ]]; then
echo "This script must be run from the root of the repository"
exit 1
fi

# use `|| true` to prevent premature exit since grep returns non-zero if no
# matches are found.
Expand Down

0 comments on commit e6f935f

Please sign in to comment.