示例#1
0
def release(path, repository):
    """
    Create a new release upgrade recipe (for developers).
    """
    from invenio.modules.upgrader.commands import \
        cmd_upgrade_create_release_recipe
    cmd_upgrade_create_release_recipe(path, repository)
示例#2
0
    def test_create_release(self):
        """ Test creation of upgrades """
        from invenio.modules.upgrader.engine import InvenioUpgrader
        from invenio.modules.upgrader.commands import \
            cmd_upgrade_create_standard_recipe, \
            cmd_upgrade_create_release_recipe

        engine = InvenioUpgrader(packages=[
            'invenio_upgrader_test', 'invenio_upgrader_test.mymod'])

        cmd_upgrade_create_standard_recipe(
            'invenio_upgrader_test', depends_on=[]
        )
        cmd_upgrade_create_standard_recipe(
            'invenio_upgrader_test.mymod', depends_on=[]
        )

        cmd_upgrade_create_release_recipe(
            'invenio_upgrader_test', repository='invenio', upgrader=engine
        )

        # Find all endpoints in all repositories
        upgrades = engine.get_upgrades(remove_applied=False)
        for u in upgrades:
            if u['id'] == 'invenio_release_x_y_z':
                assert len(u['depends_on']) == 2
示例#3
0
def release(path, repository):
    """
    Create a new release upgrade recipe (for developers).
    """
    from invenio.modules.upgrader.commands import \
        cmd_upgrade_create_release_recipe
    cmd_upgrade_create_release_recipe(path, repository)
示例#4
0
    def test_create_release(self):
        """ Test creation of upgrades """
        from invenio.modules.upgrader.engine import InvenioUpgrader
        from invenio.modules.upgrader.commands import \
            cmd_upgrade_create_standard_recipe, \
            cmd_upgrade_create_release_recipe

        engine = InvenioUpgrader(
            packages=['invenio_upgrader_test', 'invenio_upgrader_test.mymod'])

        cmd_upgrade_create_standard_recipe('invenio_upgrader_test',
                                           depends_on=[])
        cmd_upgrade_create_standard_recipe('invenio_upgrader_test.mymod',
                                           depends_on=[])

        cmd_upgrade_create_release_recipe('invenio_upgrader_test',
                                          repository='invenio',
                                          upgrader=engine)

        # Find all endpoints in all repositories
        upgrades = engine.get_upgrades(remove_applied=False)
        for u in upgrades:
            if u['id'] == 'invenio_release_x_y_z':
                assert len(u['depends_on']) == 2