Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
camillobruni committed Nov 22, 2022
1 parent 0da5473 commit ae9b542
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions update.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env python3

import subprocess
import tempfile
import os
import sys
from pathlib import Path

# =============================================================================
Expand Down Expand Up @@ -110,7 +108,9 @@ def filter_by_stamp(values):
with Step("Fetch Filtered Branches"):
# Fetch only the required branches
BRANCHES = list(filter(filter_by_stamp, BRANCHES))
BRANCHES = BRANCHES[-2:]
# Only update the last 3 branches
BRANCHES = BRANCHES[-3:]
print(f"BRANCHES {BRANCHES}")
git("fetch", "--depth=1", "origin",
*(branch for version, branch, sha in BRANCHES))

Expand Down Expand Up @@ -177,6 +177,5 @@ def inject_analytics(html_file):
with Step("Inject Analytics"):
inject_analytics(INDEX_HTML)
for version, branch, sha in BRANCHES:
branch_dir = branch_dir / version
for html_file in OUT_DIR.glob("**/*.html"):
inject_analytics(html_file)

0 comments on commit ae9b542

Please sign in to comment.