Skip to content

Commit

Permalink
chore: set base doc url and reference slug
Browse files Browse the repository at this point in the history
  • Loading branch information
tigarmo committed Jun 21, 2024
1 parent 7718957 commit 3f0228d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions rockcraft/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
ProjectClass=project.Project,
BuildPlannerClass=project.BuildPlanner,
source_ignore_patterns=["*.rock"],
docs_url="https://documentation.ubuntu.com/rockcraft/en/stable",
)


Expand Down
10 changes: 10 additions & 0 deletions rockcraft/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ def get_build_plan(self) -> list[BuildInfo]:

return build_infos

@override
@classmethod
def model_reference_slug(cls) -> str | None:
return "/reference/rockcraft.yaml"


class Project(YamlModelMixin, BuildPlanner, BaseProject): # type: ignore[misc]
"""Rockcraft project definition."""
Expand Down Expand Up @@ -512,6 +517,11 @@ def unmarshal(cls, data: dict[str, Any]) -> Self:

return cls(**data)

@override
@classmethod
def model_reference_slug(cls) -> str | None:
return "/reference/rockcraft.yaml"


def load_project(filename: Path) -> dict[str, Any]:
"""Load and unmarshal the project YAML file.
Expand Down

0 comments on commit 3f0228d

Please sign in to comment.