mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Add script for checking all commits in a branch
This commit is contained in:
parent
880064b987
commit
5bd91977ee
19
scripts/check_commit.sh
Executable file
19
scripts/check_commit.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Run some tests on the current commit, similar to what CI does; useful for
|
||||
# checking every commit in a branch with `git rebase -x scripts/check_commit.sh master`.
|
||||
|
||||
set -e
|
||||
|
||||
git diff --quiet || {
|
||||
echo "Error: there are unstaged changes. Please stage or stash them before running this script."
|
||||
exit 1
|
||||
}
|
||||
|
||||
just test
|
||||
just lint
|
||||
just generate
|
||||
git diff --quiet || {
|
||||
echo "Error: auto-generated files not up to date."
|
||||
exit 1
|
||||
}
|
||||
Loading…
Reference in a new issue