INNER CODE UNIT · Python

bump_patch

jpush/jpush-react-native · .claude/skills/update-sdk/scripts/plugin_updater.py:19

def bump_patch(version: str) -> str:
    """Bump patch version. patch and minor cap at 9; carry over to next component at 10."""
    parts = version.split(".")
    major, minor, patch = int(parts[0]), int(parts[1]), int(parts[2])
    patch += 1
    if patch >= 10:
        patch = 0
        minor += 1
    if minor >= 10:
        minor = 0
        major += 1
    return f"{major}.{minor}.{patch}"


def get_current_version_from_ref(ref: dict) -> str | None:
    """Read the current version string from a file ref."""
    path = Path(ref["path"])
    if not path.exists():

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…