Skip to content

Commit

Permalink
Makefile: Add clean target
Browse files Browse the repository at this point in the history
Adding `make clean` target to main Makefile. This helps a lot debugging
jsonnet vendoring issues.

Relevant `git clean` manual entry:

```man
-d
Remove untracked directories in addition to untracked files.
If an untracked directory is managed by a different Git repository, it
is not removed by default. Use -f option twice if you really want to
remove such a directory.

-f, --force
If the Git configuration variable clean.requireForce is not set to
false, git clean will refuse to delete files or directories unless given
-f, -n or -i. Git will refuse to delete directories with .git sub
directory or file unless a second -f is given.

-X
Remove only files ignored by Git. This may be useful to rebuild
everything from scratch, but keep manually created files.
```
  • Loading branch information
mxinden committed Aug 16, 2018
1 parent 2595c90 commit ce25b2b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ pkgs = $(shell go list ./... | grep -v /vendor/ | grep -v /test/)
.PHONY: all
all: format generate build test

.PHONY: clean
clean:
# Remove all files and directories ignored by git.
git clean -Xfd .


############
# Building #
Expand Down

0 comments on commit ce25b2b

Please sign in to comment.