How to use the mike.commands.set_default function in mike

To help you get started, we’ve selected a few mike examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jimporter / mike / test / unit / test_commands.py View on Github external
def test_branch(self):
        self._deploy('branch')
        commands.set_default('1.0', branch='branch')
        check_call_silent(['git', 'checkout', 'branch'])
        self._test_default()
github jimporter / mike / test / unit / test_commands.py View on Github external
def test_commit_message(self):
        self._deploy()
        commands.set_default('1.0', message='commit message')
        check_call_silent(['git', 'checkout', 'gh-pages'])
        self._test_default('commit message')
github jimporter / mike / test / unit / test_commands.py View on Github external
def test_set_default(self):
        self._deploy()
        commands.set_default('1.0')
        check_call_silent(['git', 'checkout', 'gh-pages'])
        self._test_default()
github jimporter / mike / test / unit / test_commands.py View on Github external
def test_set_invalid_default(self):
        self._deploy()
        self.assertRaises(ValueError, commands.set_default, '2.0')
        self.assertRaises(ValueError, commands.set_default, '1.0',
                          branch='branch')
github jimporter / mike / mike / driver.py View on Github external
def set_default(args):
    check_remote_status(args, strict=True)
    commands.set_default(args.version, args.branch, args.message)
    if args.push:
        git_utils.push_branch(args.remote, args.branch, args.force)