Port new_keyboard.sh to CLI (#13706)

Co-authored-by: Erovia <Erovia@users.noreply.github.com>
This commit is contained in:
RyanandErovia authored and GitHub committed 2021-07-30 21:57:40 +01:00
1 parent 770a525425
commit b021c2f2c5
7 files changed
+208 -56

No files matched your search

+9
View File
@@ -240,6 +240,15 @@ def parse_configurator_json(configurator_file):
return user_keymap
def git_get_username():
"""Retrieves user's username from Git config, if set.
"""
git_username = cli.run(['git', 'config', '--get', 'user.name'])
if git_username.returncode == 0 and git_username.stdout:
return git_username.stdout.strip()
def git_check_repo():
"""Checks that the .git directory exists inside QMK_HOME.