Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion create-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ def dependency_exists(command) -> bool:
def sed(file: str, pattern: str, replace: str) -> None:
"""Perform regex substitution on a given file"""
try:
check_run(["sed", "-i", "", "-e", f"s#{pattern}#{replace}#g", file], capture_output=False)
if sys.platform == "linux" or "linux2":
check_run(["sed", "-i", "-e", f"s#{pattern}#{replace}#g", file], capture_output=False)
elif sys.platform == "darwin":
check_run(["sed", "-i", "", "-e", f"s#{pattern}#{replace}#g", file], capture_output=False)
else: # windows, other
raise RuntimeError(f"Current operating system not supported for release publishing: {sys.platform}: ")
except Exception as ex:
raise RuntimeError(f"Error processing updated to file {file}: ") from ex

Expand Down