From 38e6785d3c27050907dd6e340f1c7779e6100ede Mon Sep 17 00:00:00 2001 From: rjdbcm Date: Mon, 10 Jun 2024 17:04:33 -0500 Subject: [PATCH 1/3] :wastebasket: delete .gitattributes and modelines Signed-off-by: rjdbcm --- .gitattributes | 2 -- README | 3 --- 2 files changed, 5 deletions(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 9954667a..00000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -README -linguist-documentation -README linguist-language=rst diff --git a/README b/README index afefad5b..a72b837c 100644 --- a/README +++ b/README @@ -1,6 +1,3 @@ -.. - # vim: set ft=restructuredtext - .. OZI Classifier: License-Expression :: Apache-2.0 WITH LLVM-exception Classifier: License-File :: LICENSE.txt From 44d2033ea1b6d23a1690255ee833f63a7aede975 Mon Sep 17 00:00:00 2001 From: rjdbcm Date: Mon, 10 Jun 2024 18:10:29 -0500 Subject: [PATCH 2/3] :bug:(ozi-new): create an appropriate symlink for GitHub README rendering to work Signed-off-by: rjdbcm --- ozi/fix/build_definition.py | 1 + ozi/new/__main__.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ozi/fix/build_definition.py b/ozi/fix/build_definition.py index e7f61fde..b218aa5f 100644 --- a/ozi/fix/build_definition.py +++ b/ozi/fix/build_definition.py @@ -59,6 +59,7 @@ def process( file for file in os.listdir(target / rel_path) if os.path.isfile(target / rel_path / file) + and not os.path.islink(target / rel_path / file) ] found_files = found_files if found_files else [] extra_files = list(set(extra_files).symmetric_difference(set(found_files))) diff --git a/ozi/new/__main__.py b/ozi/new/__main__.py index 06119cda..aeb394d8 100644 --- a/ozi/new/__main__.py +++ b/ozi/new/__main__.py @@ -5,6 +5,7 @@ """ozi-new entrypoint script.""" from __future__ import annotations +import os import re from pathlib import Path from typing import TYPE_CHECKING @@ -44,7 +45,11 @@ def create_project_files( project.allow_file = set(map(Path, project.allow_file)) project.ci_user = render_ci_files_set_user(env, project.target, project.ci_provider) render_project_files(env, project.target, project.name) - + if project.ci_provider == 'github': + Path( + project.target, + f'README.{project.readme_type}', + ).symlink_to(Path(project.target, 'README')) def _valid_project(project: Namespace) -> Namespace: """Validate a project namespace.""" From f4c3e2ef360c75f3efc55ed05b2c2ef7acb944f5 Mon Sep 17 00:00:00 2001 From: rjdbcm Date: Mon, 10 Jun 2024 18:11:12 -0500 Subject: [PATCH 3/3] remove unused import Signed-off-by: rjdbcm --- ozi/new/__main__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ozi/new/__main__.py b/ozi/new/__main__.py index aeb394d8..a107eecd 100644 --- a/ozi/new/__main__.py +++ b/ozi/new/__main__.py @@ -5,7 +5,6 @@ """ozi-new entrypoint script.""" from __future__ import annotations -import os import re from pathlib import Path from typing import TYPE_CHECKING