Beispiel #1
0
    def clone(self):

        print('# Cloning lk-repo')

        clone_command = SourceCodeRepo(self.url).clone_command

        command = '{clone_command} {local_repo_path}'.format(
            clone_command=clone_command,
            local_repo_path=self.local_repo_string_path)

        run_and_confirm(command)
Beispiel #2
0
    def push_changes(self):

        commands_template = multi_command_template("""
cd {commands_repo_string_path}
git push
""")

        commands = commands_template.format(
            commands_repo_string_path=self.local_repo_string_path,
        )

        run_and_confirm(commands)
Beispiel #3
0
    def clone_lk_repo(self):

        print('# Cloning lk-repo')

        # [email protected]:lk-commands/default.git

        clone_command = SourceCodeRepo(self.remote_commands_repo).clone_command

        # command = 'git clone [email protected]:breezometer/lk-commands.git {local_commands_dir_path}'.format(
        command = '{clone_command} {local_repo_path}'.format(
            clone_command=clone_command,
            local_repo_path=self.local_repo_string_path
        )

        run_and_confirm(command)
Beispiel #4
0
    def commit_changes(self):

        print('# Committing changes')

        commit_message = self.get_commit_message()

        commands_template = multi_command_template("""
cd {commands_repo_string_path}
git add .
git commit -am "{commit_message}"
""")

        commands = commands_template.format(
            commands_repo_string_path=self.local_repo_string_path,
            command_name=self.command_name,
            commit_message=commit_message
        )

        run_and_confirm(commands)
Beispiel #5
0
    def remove_command(self, command_name):

        command_path = Command(command_name).path

        run_and_confirm('rm {command_path}'.format(command_path=command_path))