File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 10
10
def system (command ):
11
11
print (command )
12
12
exit_code = os .system (command )
13
- if exit_code :
13
+ if exit_code != 0 :
14
14
sys .exit (exit_code )
15
15
16
16
@@ -21,7 +21,7 @@ def check_git():
21
21
22
22
system ("git fetch origin" )
23
23
behind = int (subprocess .check_output (["git" , "rev-list" , "--count" , "master..origin/master" ]))
24
- if behind :
24
+ if behind > 0 :
25
25
print (f"master is { behind } commit(s) behind origin/master" )
26
26
sys .exit (1 )
27
27
@@ -65,14 +65,15 @@ def tag_and_push():
65
65
release_txt .write (headline + os .linesep )
66
66
67
67
for line in changelog_file :
68
- if line .startswith ("-------" ) and not first_section :
69
- first_section = True
68
+ if not first_section :
69
+ if line .startswith ("-------" ):
70
+ first_section = True
70
71
else :
71
72
if line .startswith ("-------" ):
72
73
break
73
-
74
- if not prev_line .startswith ("------" ):
75
- release_txt .write (prev_line )
74
+ else :
75
+ if not prev_line .startswith ("------" ):
76
+ release_txt .write (prev_line )
76
77
77
78
prev_line = line
78
79
You can’t perform that action at this time.
0 commit comments