shell/step

This commit is contained in:
Marc Beninca 2024-09-14 11:36:14 +02:00
parent bfc4538dcf
commit 4bd86a8880
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 8 additions and 3 deletions

View file

@ -3,3 +3,8 @@
import importlib import importlib
env = importlib.import_module("env") env = importlib.import_module("env")
try:
step = int(env.SPCD_STEP)
except AttributeError:
step = 1

View file

@ -7,7 +7,7 @@ from urllib.parse import urlparse, urlunparse
from rwx import fs from rwx import fs
from rwx.log import stream as log from rwx.log import stream as log
from spcd.shell import env from spcd import env, shell
def add_url_path(url: str, extra_path: str) -> str: def add_url_path(url: str, extra_path: str) -> str:
@ -57,7 +57,7 @@ def split() -> None:
def step(text: str) -> None: def step(text: str) -> None:
"""Increment the step number of the current build process.""" """Increment the step number of the current build process."""
env.SPCD_STEP += 1 shell.step += 1
log.info(env.SPCD_DOWN) log.info(env.SPCD_DOWN)
log.info(f"{env.SPCD_VERT} {env.SPCD_STEP} {text}") log.info(f"{env.SPCD_VERT} {shell.step} {text}")
log.info(env.SPCD___UP) log.info(env.SPCD___UP)