# Path: django_sonic_screwdriver/git/git.py
# GIT_OPTIONS = {
#     "DEVELOPMENT": "development",
#     "STAGING": "staging",
#     "PRODUCTION": "production",
# }
# class Git:
#     def create_git_version_tag(deploy_tag):
#     def get_current_branch():
#     def get_latest_tag():
#     def check_existence_of_staging_tag_in_remote_repo():
#     def __debug(command, dry=False):
#     def __git_tag(git_tag):
#     def __git_tag_gpg(git_tag):
#     def __git_tag_push():
#     def __git_tag_delete(git_tag):
#     def __git_push(self):
#     def tag(self, deploy_tag=""):
#     def push_tags(self):
#     def tag_delete(self, tag):
# 
# Path: django_sonic_screwdriver/settings.py
# USER_SETTINGS = getattr(settings, "SONIC_SCREWDRIVER", None)
# DEFAULTS = {
#     "DEBUG": False,
#     # Returns file where the version number is located
#     "VERSION_FILE": "setup.py",
#     "RELEASE_SEPARATOR": "",
#     "PATCH_AUTO_TAG": False,
#     # Git
#     "GIT_DIR": settings.BASE_DIR,
#     # Git Tagging
#     "GIT_TAG_AUTO_TAG_PUSH": False,
#     "GIT_STAGING_PRE_TAG": "staging",
#     "GIT_ACTIVATE_PRE_TAG": "activate",
#     "SECURE_TAGGING": True,
#     # App Ban
#     "BAN_REMOTE_ADDR_HEADER": "REMOTE_ADDR",
#     "BAN_DEFAULT_END_TIME": 60 * 60,
# }
# class APISettings(object):
#     def __init__(self, user_settings=None, defaults=None):
#     def __getattr__(self, attr):


from django.core.management.base import BaseCommand
from django_sonic_screwdriver.git import git
from django_sonic_screwdriver.settings import api_settings
            dest="production",
            default=False,
            help="Create a production tag (e.g. activate-v1.2.3)",
        )

        parser.add_argument(
            "--push", action="store_true", dest="push", default=False, help="Push tags"
        )

    def handle(self, *args, **options):
        """
        :param args:
        :param options:
        :return:
        """
        counter = 0
        tag_succeed = 1

        for key in options:
            if options[key]:
                counter += 1

        # If no options are set, do a normal patch
        if counter == 1:
            options["default"] = True

        if options["default"]:
            tag_succeed = git.tag()

        if options["staging"]:

# Path: django_sonic_screwdriver/git/git.py
# GIT_OPTIONS = {
#     "DEVELOPMENT": "development",
#     "STAGING": "staging",
#     "PRODUCTION": "production",
# }
# class Git:
#     def create_git_version_tag(deploy_tag):
#     def get_current_branch():
#     def get_latest_tag():
#     def check_existence_of_staging_tag_in_remote_repo():
#     def __debug(command, dry=False):
#     def __git_tag(git_tag):
#     def __git_tag_gpg(git_tag):
#     def __git_tag_push():
#     def __git_tag_delete(git_tag):
#     def __git_push(self):
#     def tag(self, deploy_tag=""):
#     def push_tags(self):
#     def tag_delete(self, tag):
# 
# Path: django_sonic_screwdriver/settings.py
# USER_SETTINGS = getattr(settings, "SONIC_SCREWDRIVER", None)
# DEFAULTS = {
#     "DEBUG": False,
#     # Returns file where the version number is located
#     "VERSION_FILE": "setup.py",
#     "RELEASE_SEPARATOR": "",
#     "PATCH_AUTO_TAG": False,
#     # Git
#     "GIT_DIR": settings.BASE_DIR,
#     # Git Tagging
#     "GIT_TAG_AUTO_TAG_PUSH": False,
#     "GIT_STAGING_PRE_TAG": "staging",
#     "GIT_ACTIVATE_PRE_TAG": "activate",
#     "SECURE_TAGGING": True,
#     # App Ban
#     "BAN_REMOTE_ADDR_HEADER": "REMOTE_ADDR",
#     "BAN_DEFAULT_END_TIME": 60 * 60,
# }
# class APISettings(object):
#     def __init__(self, user_settings=None, defaults=None):
#     def __getattr__(self, attr):


# Path: django_sonic_screwdriver/management/commands/git:tag.py
from django.core.management.base import BaseCommand
from django_sonic_screwdriver.git import git
from django_sonic_screwdriver.settings import api_settings

            dest="production",
            default=False,
            help="Create a production tag (e.g. activate-v1.2.3)",
        )

        parser.add_argument(
            "--push", action="store_true", dest="push", default=False, help="Push tags"
        )

    def handle(self, *args, **options):
        """
        :param args:
        :param options:
        :return:
        """
        counter = 0
        tag_succeed = 1

        for key in options:
            if options[key]:
                counter += 1

        # If no options are set, do a normal patch
        if counter == 1:
            options["default"] = True

        if options["default"]:
            tag_succeed = git.tag()

        if options["staging"]:

            tag_succeed = git.tag(api_settings.GIT_STAGING_PRE_TAG)