def set_repo_version(repo, version):
    with open(repo.get_metadata_path('version'), 'w') as out:
        out.write(str(version))
    repo.run_git_command(
        'add', '-f', repo.get_metadata_path('version'), failure_ok=True,
    )
    repo.run_git_command(
        'commit', '-m', 'Upgraded Repository to v%s' % version, failure_ok=True
    )
dataset/ETHPy150Open coddingtonbear/jirafs/jirafs/migrations.py/set_repo_version/original