Repository navigation
feat(mac-crafter): Build with craftmaster config - #11435
claucambra wants to merge 12 commits into
Conversation
459371a to
260220f
Compare
Bundle a standalone adapter for CraftMaster’s Config.py so settings are read with the same INI syntax and target precedence as CraftMaster. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Clone CraftMaster before reading repository defaults. Apply those defaults during setup and builds while honoring command-line overrides. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Distinguish Git branches from pinned tags and commits before forming a Craft repository argument. Cover the distinction and remote failure with local Git repositories. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Use branch-aware repository arguments for setup. Share the merged INI with CraftMaster, scope branch overrides to the corresponding checkout, and honor explicit test flags before parsing the configured boolean. Forward reader diagnostics on stderr so they cannot break JSON decoding. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
260220f to
ed94efb
Compare
Respect offline lookups and Craft Git URLs. Qualify a tag that shares its name with a branch, and keep explicit pins free of remote probes. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Apply stock revisions to the default repositories, use the configured blueprint root for checkout overrides, and honor configured offline mode during registration. Send reader diagnostics through the mac-crafter logger and include them in configuration errors. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
|
|
Hi, [P2] The canonical Nextcloud blueprint URL drops the configured revision. The default URL uses the old desktop-client-blueprints.git name. Passing --client-blueprints-git-url=https://github.com/nextcloud/craft-blueprints-nextcloud.git selects the same repository, but the literal URL comparison discards stable-35.0. Setup then registers master. Recognize both official names and add a regression test that checks the resulting registration argument. Build.swift, line 145 · Canonical repository [P2] --offline --reconfigure-craft still runs git ls-remote. Both repository lookups receive only the INI’s General/WorkOffline value. With the checked-in configuration, an explicit --offline therefore triggers a remote lookup for stable-35.0 and can abort setup on a disconnected machine even when both checkouts already exist. The CLI flag reaches only the final client build. Use the effective offline setting for discovery and the Craft setup commands as well. Build.swift, line 310 [P2] A branch-only CraftMaster configuration falls back to master. For example, if the INI sets craft/craft-blueprints-nextcloud.branch = stable-35.0 and leaves .revision unset, the reader returns no client revision. Registration then emits |master|. The PR already writes .branch overrides itself, so reading that setting would make setup honor the same configuration it generates. Add a branch-only case that checks the registration argument. Configuration reader, line 70 · Fallback in Craft.swift, line 21 |
i2h3
left a comment
There was a problem hiding this comment.
Thanks for this. Reading craftmaster.ini instead of keeping a second set of defaults in mac-crafter is the right direction. I'm requesting changes for one bug; the other inline comments are smaller changes I'd like to see before merge.
Blocking
- With the client blueprint repo's current URL (
craft-blueprints-nextcloud.git), mac-crafter silently registersmasterinstead of the ini revision.
Requested before merge
- The tests run the reader against a hand-written
Config.py, not CraftMaster's real one. - The
git ls-remoteprobe tells tags from branches, but the ini value is a branch today and Windows CI treats it as one. buildTestsis parsed a second time although CraftMaster already hands it to Craft.- The override code handles three cases that don't occur: a legacy
craft-kdefolder, a customBlueprintRoot, and acraft/craft-blueprints-nextcloudblueprint, which Craft does not have.
Fixing the last three removes a large part of the new code and tests. Each inline comment names the tests that need to change with it.
How this was checked: I read the diff alongside the Craft source at 6e684481b (the CraftRevision in craftmaster.ini) and the CraftMaster source at 8a19d8f, and compared the blueprint refs with git ls-remote. I did not run mac-crafter or the reader.
Assisted by ClaudeCode:claude-opus-5-5
Resolve deferred settings against the selected Craft templates, preserve cached checkouts during inspection, and register the imported CraftMaster configuration module normally. Use Craft mirrors for fresh probes and the configured Git remote for cached checkouts. Qualify confirmed tags before registration. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Recognize the official Nextcloud blueprint URL aliases, honor configured branches, and forward offline mode to setup. Resolve blueprint refs without remote probes and let Craft consume configured test settings directly. Scope the CLI overlay to the current KDE checkout and use the upstream CraftMaster parser as the test fixture. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Ask Craft which checkout its KDE recipe uses after repository registration. Apply the requested branch only if the checkout matches, then pass the selected settings to dependency installation and the build. Keep the checkout probe independent of the requested branch so a different checkout retains its configured ref. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
Restore CraftMaster’s generated BlueprintSettings.ini after temporary registration and checkout verification, including failed commands and Ctrl-C. Resolve the generated file from the configured target root. Assisted-by: Codex:gpt-6 Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3802732 to
7bd48ad
Compare
Query the initialized Craft checkout for the effective build type. Verify the KDE checkout against its configured refs before creating an override scoped to the selected target. Keep the fixed INI keys in the reader and exercise it and output capture directly in tests. Assisted-by: Codex:gpt-6 Assisted-by: Codex:gpt-6.2-sol Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
7bd48ad to
51b0a72
Compare
…aster Read blueprint URLs and refs from craftmaster.ini and let Craft apply the configured build type and test settings. Select the developer build type from the same configuration for the Xcode launcher. Assisted-by: Codex:gpt-6.2-sol Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>



Summary
mac-crafter now reads blueprint revisions, build type, and test settings from craftmaster.ini, so its defaults stay in sync with the repository. The current config selects the stable-35.0 blueprints during Craft setup and enables test builds.
Checklist
AI (if applicable)