Skip to content

Commit

Permalink
fix: set core24 to unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
syu-w committed Jan 23, 2024
1 parent aad80e6 commit a9ee505
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions snapcraft/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,15 @@ def _validate_grade_and_build_base(cls, values):
raise ValueError("grade must be 'devel' when build-base is 'devel'")
return values

@pydantic.validator("base", always=True)
@classmethod
def _validate_base(cls, base, values):
"""Not allowed to use unsable base without devel build-base."""
if values.get("base") == "core24" and values.get("build_base") != "devel":
raise ValueError("build-base must be 'devel' when base is 'core24'")

return base

@pydantic.validator("build_base", always=True)
@classmethod
def _validate_build_base(cls, build_base, values):
Expand Down
1 change: 1 addition & 0 deletions snapcraft/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"core18": bases.BuilddBaseAlias.BIONIC,
"core20": bases.BuilddBaseAlias.FOCAL,
"core22": bases.BuilddBaseAlias.JAMMY,
"core24": bases.BuilddBaseAlias.DEVEL,
"devel": bases.BuilddBaseAlias.DEVEL,
}

Expand Down

0 comments on commit a9ee505

Please sign in to comment.