PyFunceble/production.py
def is_dev_version(cls):
        """
        Check if the current branch is `dev`.
        """

        # We initiate the command we have to run in order to
        # get the branch we are currently working with.
        command = "git branch"

        # We execute and get the command output.
        command_result = Command(command).execute()

        for branch in command_result.split("\n"):
            # We loop through each line of the command output.

            if branch.startswith("*") and "dev" in branch:
                # The current branch is `dev`.

                # We return True.
                return True

        # The current branch is not `dev`.

        # We return False.
        return False
def is_dev_version(cls):
        # We initiate the command we have to run in order to
        # get the branch we are currently working with.
        command = "git branch"

        # We execute and get the command output.
        command_result = Command(command).execute()

        for branch in command_result.split("\n"):
            # We loop through each line of the command output.

            if branch.startswith("*") and "dev" in branch:
                # The current branch is `dev`.

                # We return True.
                return True

        # The current branch is not `dev`.

        # We return False.
        return False
def is_dev_version ( cls ) : # We initiate the command we have to run in order to # get the branch we are currently working with. command = "git branch" # We execute and get the command output. command_result = Command ( command ) . execute ( ) for branch in command_result . split ( "\n" ) : # We loop through each line of the command output. if branch . startswith ( "*" ) and "dev" in branch : # The current branch is `dev`. # We return True. return True # The current branch is not `dev`. # We return False. return False
Check if the current branch is `dev`.
Check if the current branch is dev .