Skip to content

Commit

Permalink
Convert to use of submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed Dec 4, 2024
1 parent c4765ca commit 1eea717
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
20 changes: 20 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[submodule "0.1"]
path = 0.1
url = https://github.com/joshmoore/ngff-specifications
branch = 0.1
[submodule "0.2"]
path = 0.2
url = https://github.com/joshmoore/ngff-specifications
branch = 0.2
[submodule "0.3"]
path = 0.3
url = https://github.com/joshmoore/ngff-specifications
branch = 0.3
[submodule "0.4"]
path = 0.4
url = https://github.com/joshmoore/ngff-specifications
branch = 0.4
[submodule "0.5"]
path = 0.5
url = https://github.com/joshmoore/ngff-specifications
branch = 0.5
1 change: 1 addition & 0 deletions 0.1
Submodule 0.1 added at a89699
1 change: 1 addition & 0 deletions 0.2
Submodule 0.2 added at 52ef85
1 change: 1 addition & 0 deletions 0.3
Submodule 0.3 added at 1107cc
1 change: 1 addition & 0 deletions 0.4
Submodule 0.4 added at 3643ec
1 change: 1 addition & 0 deletions 0.5
Submodule 0.5 added at 3a4978
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ help:

.PHONY: help Makefile clean


clean: Makefile
rm -rf .cache 0.1 0.2 0.3 0.4 0.5 draft
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
21 changes: 1 addition & 20 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,7 @@ def bikeshed():
import shutil
import subprocess

branches = subprocess.check_output(
f"git branch -l v/*",
shell=True,
).split()
branches = [x.decode("utf-8").strip() for x in branches]
# TODO: generate specifications/index.md
for branch in branches:
version = branch[2:]
os.makedirs(".cache", exist_ok=True)
subprocess.check_call(
#f"git clone --depth=1 --branch v/{version} https://github.com/ome/ngff.git .cache/{version}",
f"git clone --depth=1 --branch {branch} . .cache/{version}",
shell=True,
)
os.symlink(f".cache/{version}/{version}", f"{version}")

# TODO: skip this step on a tag
os.symlink("spec", "draft")

for index_file in ["draft/index.bs"] + glob.glob("[0-9]*/index.bs"):
for index_file in glob.glob("[0-9]*/index.bs"):
output_file = index_file.replace("bs", "html")
output_dir = os.path.dirname(output_file)
target_dir = os.path.join("_bikeshed", output_dir)
Expand Down
1 change: 0 additions & 1 deletion specifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Version history:
<li> <a href="../0.3/index.html">0.3</a> August 2021</li>
<li> <a href="../0.4/index.html">0.4</a> February 2022</li>
<li> <a href="../0.5/index.html">0.5</a> November 2024</li>
<li> <a href="../draft/index.html">draft</a> </li>
</ul>

0 comments on commit 1eea717

Please sign in to comment.