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 1010def system (command ):
1111 print (command )
1212 exit_code = os .system (command )
13- if exit_code :
13+ if exit_code != 0 :
1414 sys .exit (exit_code )
1515
1616
@@ -21,7 +21,7 @@ def check_git():
2121
2222 system ("git fetch origin" )
2323 behind = int (subprocess .check_output (["git" , "rev-list" , "--count" , "master..origin/master" ]))
24- if behind :
24+ if behind > 0 :
2525 print (f"master is { behind } commit(s) behind origin/master" )
2626 sys .exit (1 )
2727
@@ -65,14 +65,15 @@ def tag_and_push():
6565 release_txt .write (headline + os .linesep )
6666
6767 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
7071 else :
7172 if line .startswith ("-------" ):
7273 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 )
7677
7778 prev_line = line
7879
You can’t perform that action at this time.
0 commit comments