File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 10
10
11
11
tag = repo .git .describe (tags = True , abbrev = 0 )
12
12
m = 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 )
16
13
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
+
20
28
expected_version = f"{ expected_major } .{ expected_minor } .{ expected_patch } "
21
29
22
30
m = re .match ("[0-9]+\.[0-9]+\.[0-9]+" , version )
You can’t perform that action at this time.
0 commit comments