Skip to content

Commit 00816cc

Browse files
committed
make sure codegen doesn't cause spurious diffs for no reason
1 parent 6813227 commit 00816cc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

llama_stack/scripts/distro_codegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def generate_dependencies_file():
103103

104104
deps_file = REPO_ROOT / "distributions" / "dependencies.json"
105105
with open(deps_file, "w") as f:
106-
json.dump(distribution_deps, f, indent=2)
106+
f.write(json.dumps(distribution_deps, indent=2) + "\n")
107107

108108

109109
def main():

llama_stack/templates/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@ def save_distribution(self, yaml_output_dir: Path, doc_output_dir: Path) -> None
161161

162162
docs = self.generate_markdown_docs()
163163
with open(doc_output_dir / f"{self.name}.md", "w") as f:
164-
f.write(docs)
164+
f.write(docs if docs.endswith("\n") else docs + "\n")

0 commit comments

Comments
 (0)