Skip to content

Commit

Permalink
update release script to convert submodules to repositories (#90)
Browse files Browse the repository at this point in the history
* update release script to convert submodules to repositories for antora builds

* format ci_boost_release.py
  • Loading branch information
cmazakas authored Jan 14, 2025
1 parent 9a12834 commit e49d397
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ci_boost_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,31 @@ def command_build(self):
"using saxonhe ;",
)

# Before we build the full docs, make sure each repo opting into Antora
# doc generation is a git repository, and not a submodule
# In theory, this is only a temporary workaround and Antora will someday
# be able to work with submodules.
antora_libraries = []

os.chdir(self.root_dir)
for directoryname in glob.iglob("libs/*", recursive=False):
if os.path.isdir(directoryname) and os.path.isfile(
os.path.join(directoryname, "doc", "antora_docs.sh")
): # filter dirs
antora_libraries.append(directoryname)

for antora_lib in antora_libraries:
os.chdir(antora_lib)
# for a submodule .git is a file pointing to the gitdir
if not os.path.isfile(".git"):
print("skipping library: %s, already a git repository" % antora_lib)
continue

utils.check_call("rm", ".git")
utils.check_call("git", "init")
utils.check_call("git", "add", "doc")
utils.check_call("git", "commit", "-m", '"dummy antora commit"')

# Build the full docs, and all the submodule docs.
os.chdir(os.path.join(self.root_dir, "doc"))

Expand Down

0 comments on commit e49d397

Please sign in to comment.