logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

clean.py (539B)


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