Skip to content

Commit 977a566

Browse files
authored
Merge pull request #69 from epics-containers/fix-tests
fix dependabot tag issue
2 parents a9682aa + 44db0bb commit 977a566

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/epics_containers_cli/dev/dev_commands.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
from epics_containers_cli.git import get_git_name, get_image_name
99
from epics_containers_cli.logging import log
1010
from epics_containers_cli.shell import run_command
11-
from epics_containers_cli.utils import check_ioc_instance_path, get_instance_image_name
11+
from epics_containers_cli.utils import (
12+
check_ioc_instance_path,
13+
get_instance_image_name,
14+
normalize_tag,
15+
)
1216

1317
from ..globals import (
1418
CONFIG_FOLDER,
@@ -91,6 +95,7 @@ def launch_local(
9195
execute = f"{IOC_START}; bash"
9296

9397
repo, _ = get_git_name(generic_ioc)
98+
tag = normalize_tag(tag)
9499
image = get_image_name(repo, target=target) + f":{tag}"
95100

96101
self._do_launch(ioc_name, target, image, execute, args, mounts)
@@ -198,6 +203,7 @@ def build(
198203
"""
199204
repo, _ = get_git_name(generic_ioc)
200205
args = f"--platform {platform} {'--no-cache' if not cache else ''}"
206+
tag = normalize_tag(tag)
201207

202208
if target is None:
203209
targets = [Targets.developer.value, Targets.runtime.value]

src/epics_containers_cli/utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,13 @@ def chdir(path):
9696
yield
9797
finally:
9898
os.chdir(curdir)
99+
100+
101+
def normalize_tag(tag: str) -> str:
102+
"""
103+
normalize a tag to be lowercase and replace any '/'
104+
this is needed in CI because dependabot tags
105+
"""
106+
tag = tag.lower()
107+
tag = tag.replace("/", "-")
108+
return tag

0 commit comments

Comments
 (0)