8000 tag_release: check for uncommitted changes · capstone-rust/capstone-rs@f62c58a · GitHub
[go: up one dir, main page]

Skip to content

Commit f62c58a

Browse files
committed
tag_release: check for uncommitted changes
1 parent 637dde6 commit f62c58a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/tag_release.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ set -eu
66

77
cd "$(dirname $0)/.."
88

9+
Error() {
10+
echo "Error:" "$@" >&2
11+
exit 1
12+
}
13+
914
extract_toml_value() {
1015
grep "^$1" Cargo.toml | sed 's/^[^ =].*=.*"\([^"]\+\)"$/\1/' | head -n1
1116
}
1217

18+
git diff --exit-code HEAD || Error "Uncommitted changes"
19+
1320
PACKAGE_NAME="$(extract_toml_value name)"
1421
PACKAGE_VERSION="${PACKAGE_VERSION:-$(extract_toml_value version)}"
1522
DESCRIPTION="${PACKAGE_NAME} v${PACKAGE_VERSION}"

0 commit comments

Comments
 (0)
0