mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-09-14 00:54:33 +08:00
update pre-commit increase version logic
This commit is contained in:
parent
bde5edfec8
commit
3be193636c
2 changed files with 9 additions and 1 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
4.0.0-develop13
|
||||
4.0.0-develop14
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
staged_changes=$(git diff-index --cached HEAD | wc -l | awk '{print $1}')
|
||||
|
||||
# Check if there are any changes staged for commit
|
||||
if [ "$staged_changes" -eq 0 ]; then
|
||||
echo "There are no changes staged for commit. Skipping version update."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if the VERSION file is staged for modification
|
||||
if git diff --cached --name-only | grep -q "VERSION"; then
|
||||
echo "The VERSION file is already modified. Skipping version update."
|
||||
|
|
Loading…
Add table
Reference in a new issue