File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1- .PHONY : install lint test build update drawio
1+ .PHONY : install lint test build update drawio clean
22DEFAULT_GOAL := build
33
44install :
@@ -35,3 +35,21 @@ drawio:
3535 exit 1; \
3636 fi ; \
3737 " $$ DRAWIO_CMD" -x -o docs/assets --transparent -f png docs/assets/drawio/* .drawio
38+
39+ clean :
40+ @git fetch --prune
41+ @git branch -vv | awk ' /: gone]/{print $$1}' > .git/branches-to-delete || true
42+ @if [ -s .git/branches-to-delete ]; then \
43+ echo " ---" ; cat .git/branches-to-delete ; \
44+ while read b; do \
45+ if [ " $$ b" != " $( shell git rev-parse --abbrev-ref HEAD) " ]; then \
46+ git branch -D $$ b || true ; \
47+ else \
48+ echo " Skipping current branch: $$ b" ; \
49+ fi ; \
50+ done < .git/branches-to-delete; \
51+ else \
52+ echo " No local branches to delete" ; \
53+ fi ;
54+ @rm -Rf .git/branches-to-delete || true
55+ @rm -Rf dist node_modules coverage || true
You can’t perform that action at this time.
0 commit comments