MCPcopy Create free account
hub / github.com/boostorg/build / main

Function main

v2/engine/bump_version.py:68–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66
67
68def main():
69 if len(sys.argv) < 2:
70 print("Expect new version as argument.")
71 sys.exit(1)
72 if len(sys.argv) > 3:
73 print("Too many arguments.")
74 sys.exit(1)
75
76 version = sys.argv[1].split(".")
77 if len(version) > 3:
78 print("Expect version argument in the format: <MAJOR>.<MINOR>.<PATCH>")
79 sys.exit(1)
80
81 try:
82 version = list(int(x) for x in version)
83 except ValueError:
84 print("Version values must be valid integers.")
85 sys.exit(1)
86
87 while version and version[-1] == 0:
88 version.pop()
89
90 if not version:
91 print("At least one of the version values must be positive.")
92 sys.exit()
93
94 make_edits(version)
95
96
97if __name__ == '__main__':

Callers 1

bump_version.pyFile · 0.70

Calls 1

make_editsFunction · 0.85

Tested by

no test coverage detected