File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 3333 - name : Install Chat Dependencies
3434 run : cd chat && bun install
3535
36+ - name : Run make gen and check for unstaged changes
37+ run : |
38+ make gen
39+ ./check_unstaged.sh
40+
3641 - name : Build and Upload
3742 env :
3843 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+ FILES=()
4+ IFS=$' \n ' read -r -d ' ' -a FILES < <( git ls-files --other --modified --exclude-standard && printf ' \0' )
5+ # FILES="$(git ls-files --other --modified --exclude-standard)"
6+ if [[ " $FILES " != " " ]]; then
7+
8+ echo
9+ echo " The following files contain unstaged changes:"
10+ echo
11+ for file in " ${FILES[@]} " ; do
12+ echo " - $file "
13+ done
14+
15+ echo
16+ echo " These are the changes:"
17+ echo
18+ for file in " ${FILES[@]} " ; do
19+ git --no-pager diff -- " $file " 1>&2
20+ done
21+
22+ echo
23+ echo " ERROR: Unstaged changes, see above for details."
24+ exit 1
25+ fi
You can’t perform that action at this time.
0 commit comments