blob: d0afc84c641f77ddf1c069715ac388e0d28a5c6e [file] [log] [blame]
Joey Armstronga2db6cd2023-11-30 12:16:18 -05001# -*- makefile -*-
2## -----------------------------------------------------------------------
3## Intent: Targets in this makefile will determine if locally modified
4## files exist in the sandbox. VOLTHA currently uses this logic to
5## detect when go {tidy, update} have indirectly modified vendor go.mod
6## files during a build or test.
7## -----------------------------------------------------------------------
8
9$(error DISABLED -- not yet deployed/in use)
10
11# $(MAKE) --no-print-directory detect-local-edits
12
13## ---------------------------------------------------------------------
14## Intent: Determine if sandbox contains locally modified files
15## ---------------------------------------------------------------------
16clean-tree := git status --porcelain
17detect-local-edits:
18 $(HIDE)[[ `$(clean-tree)` == "" ]] || {\
19 echo "ERROR: Untracked files detected, commit or remove to continue" \
20 && echo "`git status`" \
21 && exit 1; }
22
23# [EOF]