Skip to content

Commit

Permalink
Fix semanticUplift.additionalSteps baseUrl prematurely
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Jul 30, 2024
1 parent ea36801 commit 242a321
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ogc/bblocks/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ def do_postprocess(bblock: BuildingBlock, light: bool = False) -> bool:
base_url, cwd if base_url else output_file_root
) + '/'

if bblock.semanticUplift and bblock.semanticUplift.get('additionalSteps'):
for step in bblock.semanticUplift['additionalSteps']:
if step.get('ref'):
step['ref'] = PathOrUrl(bblock.files_path).resolve_ref(step['ref']).with_base_url(
base_url, cwd if base_url else output_file_root
)

if not light:
if not steps or 'tests' in steps:
print(f" > Running tests for {bblock.identifier}", file=sys.stderr)
Expand Down Expand Up @@ -198,6 +191,13 @@ def do_postprocess(bblock: BuildingBlock, light: bool = False) -> bool:
transform['ref'] = urljoin(bblock.metadata['sourceFiles'], transform['ref'])
bblock.metadata['transforms'].append({k: v for k, v in transform.items() if k != 'code'})

if bblock.semanticUplift and bblock.semanticUplift.get('additionalSteps'):
for step in bblock.semanticUplift['additionalSteps']:
if step.get('ref'):
step['ref'] = PathOrUrl(bblock.files_path).resolve_ref(step['ref']).with_base_url(
base_url, cwd if base_url else output_file_root
)

if not light and (not steps or 'doc' in steps):
print(f" > Generating documentation for {bblock.identifier}", file=sys.stderr)
doc_generator.generate_doc(bblock)
Expand Down

0 comments on commit 242a321

Please sign in to comment.