list_environment_variables

This commit is contained in:
Marc Beninca 2024-07-29 14:20:15 +02:00
parent 8c5ada3f94
commit 2c5c28f364
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 10 additions and 10 deletions

View file

@ -44,17 +44,26 @@ def install_commands(path: str) -> None:
for command in [ for command in [
"browse-workspace", "browse-workspace",
"build-project", "build-project",
"list-environment",
"synchronize", "synchronize",
]: ]:
log.info(command) log.info(command)
(user / f"{COMMANDS_PREFIX}{command}").symlink_to(path) (user / f"{COMMANDS_PREFIX}{command}").symlink_to(path)
def list_environment_variables() -> None:
step("List environment variables")
for variable, value in sorted(projects.environment.items()):
if variable != "SPCD_SSH_KEY":
log.info(f"{variable} = {value}")
else:
log.info(f"{variable}")
def main(main: str) -> None: def main(main: str) -> None:
path, *arguments = sys.argv path, *arguments = sys.argv
name = Path(path).name name = Path(path).name
if name == "__main__.py": if name == "__main__.py":
list_environment_variables()
clone_project_branch() clone_project_branch()
set_ssh() set_ssh()
install_commands(main) install_commands(main)

View file

@ -3,7 +3,6 @@ from pathlib import Path
import env import env
from rwx import ps from rwx import ps
from rwx.log import stream as log
from spcd.ci import project, projects from spcd.ci import project, projects
from spcd.util import browse from spcd.util import browse
@ -23,14 +22,6 @@ def spcd_build_project() -> None:
pass pass
def spcd_list_environment() -> None:
for variable, value in sorted(projects.environment.items()):
if variable != "SPCD_SSH_KEY":
log.info(f"{variable} = {value}")
else:
log.info(f"{variable}")
def spcd_synchronize() -> None: def spcd_synchronize() -> None:
host = env.SPCD_PROJECT_PATH host = env.SPCD_PROJECT_PATH
source = "out" source = "out"