Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
fix readme processing
Browse files Browse the repository at this point in the history
The readme.html (like the other HTML files) currently doesn't use DOS newlines. Also, in the HTML there's now no blank line we need to skip, so the skip_next stuff is bad.
  • Loading branch information
neogeographica committed Apr 23, 2022
1 parent 8726043 commit c0081e6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions devtools/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,9 @@ def gen_toplevel_readme():

def gen_readme(readme_contents, qss_timestamp, sql_timestamp, timestamp):
new_readme_contents= []
skip_next = False
for line in readme_contents:
if skip_next:
skip_next = False
continue
if (qss_timestamp == "") and ("###QSS_VERSION###" in line):
skip_next = True
pass
else:
new_line = line.replace(
"###QSS_VERSION###", QSS_VERSION).replace(
Expand Down Expand Up @@ -146,7 +142,7 @@ def exclusions_for_copy(dir, contents):
timestamp = time.strftime("%B %Y")
print("Quakestarter release: {}".format(RELEASE))
print("Quakestarter timestamp: {}".format(timestamp))
with open(os.path.join(QUAKE_FOLDER, "quakestarter_readme.html"), 'r', newline='\r\n') as f:
with open(os.path.join(QUAKE_FOLDER, "quakestarter_readme.html"), 'r') as f:
readme_contents = f.readlines()
gen_readme(readme_contents, "", sql_timestamp, timestamp)
release_name = "quakestarter-noengine-" + RELEASE
Expand Down

0 comments on commit c0081e6

Please sign in to comment.