INNER CODE UNIT · Python

bump

wikimedia/apps-android-wikipedia · scripts/bump-version-code.py:68

def bump(file_path):
    transform_file(file_path, set_version_code)

    # Change to the project directory
    os.chdir(path_prefix)

    # Checkout main branch
    run_git_command('checkout', 'main')

    # Try to delete existing branch
    try:
        run_git_command('branch', '-D', VERSION_CODE_BRANCH)
    except RuntimeError:
        print('Branch not deleted (safe to ignore).')

    # Create and checkout new branch
    run_git_command('checkout', '-b', VERSION_CODE_BRANCH)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…