INNER CODE UNIT · Python

set_version_code

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

def set_version_code(data):
    """
    Utility function to set new versionCode
    """
    match = version_code_pattern.search(data)
    if not match:
        raise ValueError('Version code not found')
    version_code = int(match.group('value'))
    next_version_code = r'\g<key> {}'.format(version_code + 1)
    return version_code_pattern.sub(next_version_code, data)


def run_git_command(*args, cwd=None):
    """
    Run a git command with the given arguments in a cross-platform way.
    """
    cmd = ['git'] + list(args)
    try:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…