Skip to content

Commit 35adadf

Browse files
authored
build: do not create metafiles when using reactive (#1151)
The reactive framework uses an incompatible variant that creates its own files. The format defined by charmcraft cannot be used. Fix: #1150
1 parent ed81be8 commit 35adadf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

charmcraft/commands/build.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,12 @@ def build_charm(self, bases_config: BasesConfiguration) -> str:
176176
with charmcraft.instrum.Timer("Lifecycle run"):
177177
lifecycle.run(Step.PRIME)
178178

179-
create_actions_yaml(lifecycle.prime_dir, self.config)
180-
create_config_yaml(lifecycle.prime_dir, self.config)
181-
create_metadata_yaml(lifecycle.prime_dir, self.config)
179+
# skip creation yaml files if using reactive, reactive will create them
180+
# in a incompatible way
181+
if self._parts.get("charm", {}).get("plugin", None) != "reactive":
182+
create_actions_yaml(lifecycle.prime_dir, self.config)
183+
create_config_yaml(lifecycle.prime_dir, self.config)
184+
create_metadata_yaml(lifecycle.prime_dir, self.config)
182185

183186
# run linters and show the results
184187
linting_results = charmcraft.linters.analyze(self.config, lifecycle.prime_dir)

0 commit comments

Comments
 (0)