Skip to content

Commit

Permalink
fix(rockcraft_lpci_build): both build-base and build_base are allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdcordeiro committed Apr 9, 2024
1 parent fb43333 commit 1ad97b9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rockcraft_lpci_build/rockcraft_lpci_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,13 @@ def get_rock_archs(self) -> list:

def get_rock_build_base(self) -> str:
"""Infer the Ubuntu series for lpci, from the rockcraft.yaml file"""
try:
build_base = self.rockcraft_yaml_raw["build_base"]
except KeyError:
build_base = self.rockcraft_yaml_raw.get(
"build-base", self.rockcraft_yaml_raw.get("build_base")
)

if not build_base:
logging.info(f"No 'build-base' in the rockfile. Using 'base' instead")
logging.info(self.rockcraft_yaml_raw)
try:
build_base = self.rockcraft_yaml_raw["base"]
except KeyError:
Expand Down

0 comments on commit 1ad97b9

Please sign in to comment.