-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""Clean the QMK firmware folder of build artifacts. | ||
""" | ||
from qmk.commands import run | ||
from milc import cli | ||
|
||
import shutil | ||
|
||
|
||
@cli.argument('-a', '--all', arg_only=True, action='store_true', help='Remove *.hex and *.bin files in the QMK root as well.') | ||
@cli.subcommand('Clean the QMK firmware folder of build artifacts.') | ||
def clean(cli): | ||
"""Runs `make clean` (or `make distclean` if --all is passed) | ||
""" | ||
make_cmd = 'gmake' if shutil.which('gmake') else 'make' | ||
|
||
run([make_cmd, 'distclean' if cli.args.all else 'clean']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters