builder: require durable workspace execution
Some checks failed
build / build (push) Failing after 2s
Some checks failed
build / build (push) Failing after 2s
This commit is contained in:
@@ -15,6 +15,7 @@ import tarfile
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
from importlib import resources
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
import boto3
|
||||
@@ -927,11 +928,21 @@ def _render_a2a_init_template(
|
||||
|
||||
|
||||
def _render_sdk_template(template: str, /, **vars: str) -> str:
|
||||
text = (
|
||||
resources.files("a2a_pack.cli.templates")
|
||||
.joinpath(template)
|
||||
.read_text(encoding="utf-8")
|
||||
local_templates = (
|
||||
Path(__file__).resolve().parents[2]
|
||||
/ "a2a"
|
||||
/ "a2a_pack"
|
||||
/ "cli"
|
||||
/ "templates"
|
||||
)
|
||||
if local_templates.exists():
|
||||
text = local_templates.joinpath(template).read_text(encoding="utf-8")
|
||||
else:
|
||||
text = (
|
||||
resources.files("a2a_pack.cli.templates")
|
||||
.joinpath(template)
|
||||
.read_text(encoding="utf-8")
|
||||
)
|
||||
for key, value in vars.items():
|
||||
text = text.replace("{{ " + key + " }}", value)
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user