From 8f93fe5bd6ff2f4648678eb281b17dbc70331f12 Mon Sep 17 00:00:00 2001 From: Alex Batisse Date: Tue, 4 Nov 2025 09:49:49 +0100 Subject: [PATCH 1/2] refactor: Restructure build folders --- .gitignore | 2 ++ {build => dev}/charm_01_add_ids.patch | 0 {build => dev}/snap_01_add_ids.patch | 0 noxfile.py | 2 +- 4 files changed, 3 insertions(+), 1 deletion(-) rename {build => dev}/charm_01_add_ids.patch (100%) rename {build => dev}/snap_01_add_ids.patch (100%) diff --git a/.gitignore b/.gitignore index a83e742..e0cd8a7 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ wheels/ result requirements.txt *.snap +.build # Misc .hypothesis +.helix diff --git a/build/charm_01_add_ids.patch b/dev/charm_01_add_ids.patch similarity index 100% rename from build/charm_01_add_ids.patch rename to dev/charm_01_add_ids.patch diff --git a/build/snap_01_add_ids.patch b/dev/snap_01_add_ids.patch similarity index 100% rename from build/snap_01_add_ids.patch rename to dev/snap_01_add_ids.patch diff --git a/noxfile.py b/noxfile.py index eea18f0..664ad4d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -62,7 +62,7 @@ def tests(session: nox.Session) -> None: def build_schemas(session=nox.Session) -> None: """Fetch the latest schemas available and apply patches.""" tmp_build = Path(".build") - resources_build = Path("build") + resources_build = Path("dev") src = Path("src") tmp_build.mkdir(exist_ok=True) From 5b376a1d2fedc515d3d7884311f31c6c718083b4 Mon Sep 17 00:00:00 2001 From: Alex Batisse Date: Tue, 4 Nov 2025 11:24:06 +0100 Subject: [PATCH 2/2] feat: Pin schemas --- noxfile.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/noxfile.py b/noxfile.py index 664ad4d..84f80ca 100644 --- a/noxfile.py +++ b/noxfile.py @@ -9,9 +9,13 @@ nox.options.reuse_venv = "yes" nox.options.sessions = ["fmt", "lint"] -SNAPCRAFT_URL = "https://raw.githubusercontent.com/canonical/snapcraft/refs/heads/main/schema/snapcraft.json" -ROCKCRAFT_URL = "https://raw.githubusercontent.com/canonical/rockcraft/refs/heads/main/schema/rockcraft.json" -CHARMCRAFT_URL = "https://raw.githubusercontent.com/canonical/charmcraft/refs/heads/main/schema/charmcraft.json" +# TODO: Pin versions to tagged release for all tools +CHARM_VERSION = "4.0.1" +SNAP_VERSION = "551a793ae20241db56b7edf9049070a72f5f593b" +ROCK_VERSION = "6553ac9de239be758f5cf648eb65c580709c4fc5" +SNAPCRAFT_URL = f"https://raw.githubusercontent.com/canonical/snapcraft/{SNAP_VERSION}/schema/snapcraft.json" +ROCKCRAFT_URL = f"https://raw.githubusercontent.com/canonical/rockcraft/{ROCK_VERSION}/schema/rockcraft.json" +CHARMCRAFT_URL = f"https://raw.githubusercontent.com/canonical/charmcraft/refs/tags/{CHARM_VERSION}/schema/charmcraft.json" @nox.session() @@ -60,7 +64,7 @@ def tests(session: nox.Session) -> None: @nox.session() def build_schemas(session=nox.Session) -> None: - """Fetch the latest schemas available and apply patches.""" + """Fetch the upstream schemas and apply patches.""" tmp_build = Path(".build") resources_build = Path("dev") src = Path("src")