|
1 | | -# Copyright (C) 2022, 2023, 2024, Hadron Industries, Inc. |
| 1 | +# Copyright (C) 2022, 2023, 2024, 2025, Hadron Industries, Inc. |
2 | 2 | # Carthage is free software; you can redistribute it and/or modify |
3 | 3 | # it under the terms of the GNU Lesser General Public License version 3 |
4 | 4 | # as published by the Free Software Foundation. It is distributed |
|
8 | 8 |
|
9 | 9 | from pathlib import Path |
10 | 10 | import asyncio |
11 | | -import os |
12 | 11 | import typing |
13 | 12 |
|
14 | 13 | import carthage.network |
@@ -198,6 +197,15 @@ def resource_types_to_tag(self)-> list: |
198 | 197 | ''' |
199 | 198 | return [self.resource_type] |
200 | 199 |
|
| 200 | + @property |
| 201 | + def deployable_names(self): |
| 202 | + res = [] |
| 203 | + if name := getattr(self, 'name', None): |
| 204 | + res.append(f'{self.resource_type}:{name}') |
| 205 | + if hasattr(super(), 'deployable_names'): |
| 206 | + res.extend(super().deployable_names) |
| 207 | + return res |
| 208 | + |
201 | 209 | def should_retag(self) -> bool: |
202 | 210 | '''Returns true if the resource's current tags do not align |
203 | 211 | with what :meth:`resource_tags` says they should be. |
@@ -504,11 +512,9 @@ async def read_write_hook(self): |
504 | 512 | ''' |
505 | 513 |
|
506 | 514 |
|
507 | | - @memoproperty |
508 | | - def stamp_path(self): |
509 | | - p = Path(self.config_layout.state_dir) |
510 | | - p = p.joinpath("aws_stamps", self.stamp_type,str(self.id)+".stamps") |
511 | | - os.makedirs(p, exist_ok=True) |
| 515 | + @property |
| 516 | + def stamp_subdir(self): |
| 517 | + p = Path("aws").joinpath(self.stamp_type,str(self.id)) |
512 | 518 | return p |
513 | 519 |
|
514 | 520 | async def dynamic_dependencies(self): |
|
0 commit comments