Browse Source

chore: add count commit script

main
fdai7451 2 years ago
parent
commit
0066bbcd1b
  1. 9
      count-commits.sh

9
count-commits.sh

@ -0,0 +1,9 @@
#!/bin/bash
total_commits=$(git shortlog -s -n | awk '{ sum += $1; } END { print sum; }' "$@")
if [[ $total_commits -gt 200 ]]; then
echo "Total commits: $total_commits. Minimum required commits reached!"
else
echo "Total commits: $total_commits. $(expr 200 - $total_commits) commits left to reach minimum required commits"
fi
Loading…
Cancel
Save