Skip to content

Commit

Permalink
build: do not create metafiles when using reactive (#1151)
Browse files Browse the repository at this point in the history
The reactive framework uses an incompatible variant that creates its own files.
The format defined by charmcraft cannot be used.

Fix: #1150
  • Loading branch information
syu-w authored Jul 12, 2023
1 parent ed81be8 commit 35adadf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions charmcraft/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,12 @@ def build_charm(self, bases_config: BasesConfiguration) -> str:
with charmcraft.instrum.Timer("Lifecycle run"):
lifecycle.run(Step.PRIME)

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

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

0 comments on commit 35adadf

Please sign in to comment.