How to use the mike.commands.alias 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_alias_from_alias(self):
        self._deploy()
        commands.alias('latest', ['greatest'])
        check_call_silent(['git', 'checkout', 'gh-pages'])
        self._test_alias(expected_src='latest')
github jimporter / mike / test / unit / test_commands.py View on Github external
def test_commit_message(self):
        self._deploy()
        commands.alias('1.0', ['greatest'], message='commit message')
        check_call_silent(['git', 'checkout', 'gh-pages'])
        self._test_alias('^commit message$')
github jimporter / mike / test / unit / test_commands.py View on Github external
def test_alias_invalid(self):
        self._deploy()
        self.assertRaises(ValueError, commands.alias, '2.0', ['alias'])
        self.assertRaises(ValueError, commands.alias, '1.0', ['alias'],
                          branch='branch')
github jimporter / mike / test / unit / test_commands.py View on Github external
def test_branch(self):
        self._deploy('branch')
        commands.alias('1.0', ['greatest'], branch='branch')
        check_call_silent(['git', 'checkout', 'branch'])
        self._test_alias()
github jimporter / mike / test / unit / test_commands.py View on Github external
def test_alias_from_version(self):
        self._deploy()
        commands.alias('1.0', ['greatest'])
        check_call_silent(['git', 'checkout', 'gh-pages'])
        self._test_alias()
github jimporter / mike / mike / driver.py View on Github external
def alias(args):
    check_remote_status(args, strict=True)
    commands.alias(args.version, args.alias, args.branch, args.message)
    if args.push:
        git_utils.push_branch(args.remote, args.branch, args.force)