Skip to content

Commit 76cd7fe

Browse files
authored
Revert "[OSDOCS-4538] Make the build script stop placing includes "above" the new master.adoc files" (#53533)
1 parent a0d139c commit 76cd7fe

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

build_for_portal.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,39 +1090,6 @@ def parse_repo_config(config_file, distro, version):
10901090
return repo_urls
10911091

10921092

1093-
def collect_master_adoc_files(project_path=os.path.abspath(os.curdir)):
1094-
"""Given the project path, return a list of all master.adoc file paths."""
1095-
1096-
master_adoc_collection = []
1097-
1098-
for project_dir, dirs, files in os.walk(project_path, topdown=True):
1099-
if "master.adoc" in files:
1100-
master_path = os.path.join(project_dir, "master.adoc")
1101-
master_adoc_collection.append(master_path)
1102-
1103-
return master_adoc_collection
1104-
1105-
1106-
def create_symlinks_to_project_root_from_master_files(
1107-
list_of_master_file_paths, distro="openshift-enterprise"
1108-
):
1109-
"""Create symlinks for every master.adoc-containing
1110-
directory to the openshift-docs project root."""
1111-
1112-
drupal_build_path_includes_dir = os.path.join(
1113-
os.path.abspath(os.curdir), "drupal-build", distro, "includes"
1114-
)
1115-
1116-
if not os.path.exists(drupal_build_path_includes_dir):
1117-
os.mkdir(drupal_build_path_includes_dir)
1118-
1119-
for path in list_of_master_file_paths:
1120-
directory = os.path.split(path)[0]
1121-
book_includes_dir = os.path.join(directory, "includes")
1122-
if not os.path.isdir(book_includes_dir):
1123-
os.symlink(drupal_build_path_includes_dir, book_includes_dir)
1124-
1125-
11261093
def main():
11271094
parser = setup_parser()
11281095
args = parser.parse_args()
@@ -1171,10 +1138,6 @@ def main():
11711138
log.info("Building the drupal files")
11721139
build_master_files(info)
11731140

1174-
create_symlinks_to_project_root_from_master_files(
1175-
collect_master_adoc_files(), args.distro
1176-
)
1177-
11781141
# Copy the original data and reformat for drupal
11791142
reformat_for_drupal(info)
11801143

0 commit comments

Comments
 (0)