def advance_version(v, bumprule):
    """
    Advance the version based on a version bump rule
    """
    
    vercomps = v.replace('v', '').split('.')

    majv = int(vercomps[0])
    minv = int(vercomps[1])
    patchv = int(vercomps[2])

    if bumprule == "major":
        majv += 1
        minv = 0
        patchv = 0

    if bumprule == "minor":
        minv += 1
        patchv = 0

    if bumprule == "patch":
        patchv += 1

    return "{}.{}.{}".format(majv, minv, patchv)