qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

clean.py (539B)


      1 """Clean the QMK firmware folder of build artifacts.
      2 """
      3 from subprocess import DEVNULL
      4 
      5 from qmk.commands import find_make
      6 from milc import cli
      7 
      8 
      9 @cli.argument('-a', '--all', arg_only=True, action='store_true', help='Remove *.hex and *.bin files in the QMK root as well.')
     10 @cli.subcommand('Clean the QMK firmware folder of build artifacts.')
     11 def clean(cli):
     12     """Runs `make clean` (or `make distclean` if --all is passed)
     13     """
     14     cli.run([find_make(), 'distclean' if cli.args.all else 'clean'], capture_output=False, stdin=DEVNULL)