File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1010
1111tag = repo .git .describe (tags = True , abbrev = 0 )
1212m = re .match ('llvmorg-([0-9]+)\.([0-9]+)\.([0-9]+)' , tag )
13- if not m :
14- print ("error: Tag is not valid: " , tag )
15- sys .exit (1 )
1613
17- expected_major = m .group (1 )
18- expected_minor = m .group (2 )
19- expected_patch = int (m .group (3 )) + 1
14+ if m :
15+ expected_major = m .group (1 )
16+ expected_minor = m .group (2 )
17+ expected_patch = int (m .group (3 )) + 1
18+ else :
19+ # If the previous tag is llvmorg-X-init, then we should be at version X.0.0.
20+ m = re .match ('llvmorg-([0-9]+)-init' , tag )
21+ if not m :
22+ print ("error: Tag is not valid: " , tag )
23+ sys .exit (1 )
24+ expected_major = m .group (1 )
25+ expected_minor = 0
26+ expected_patch = 0
27+
2028expected_version = f"{ expected_major } .{ expected_minor } .{ expected_patch } "
2129
2230m = re .match ("[0-9]+\.[0-9]+\.[0-9]+" , version )
You can’t perform that action at this time.
0 commit comments