feat(Makefile): add CI matrix generation and buildnumber guard#109
Merged
Conversation
4 tasks
There was a problem hiding this comment.
Pull request overview
Adds CI support utilities and hardens packaging by centralizing app/theme build lists, generating a CI matrix JSON, and enforcing build metadata presence.
Changes:
- Introduces categorized app lists and dynamic
build_<app>_apptargets derived from those lists. - Adds
generate_apps_matrix_jsontarget for CI matrix generation. - Enforces presence of
.buildnumberduringzip_dependenciesand includes it in the packaged zip. - Adds a validation script/target to prevent app list duplication and hardcoded-target conflicts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
Makefile |
Adds app category lists, dynamic build targets, CI matrix JSON generation, .buildnumber guard, and validation target. |
scripts/validate_app_list_uniqueness.sh |
New validation script to check cross-list uniqueness and hardcoded target conflicts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f0aa8b1 to
8d59541
Compare
8d59541 to
c5d0048
Compare
printminion-co
added a commit
that referenced
this pull request
May 12, 2026
Plain 'make build_css' inside the recipe is the wrong form for a recursive build: it doesn't inherit the jobserver from the parent make invocation, so when the Makefile is driven with 'make -j' (or from a parent build that already holds jobserver tokens) the inner make either prints 'warning: jobserver unavailable' or silently loses parallel scheduling. Replace it with $(MAKE), which GNU Make documents as the canonical form for recursive invocations — it propagates MAKEFLAGS, jobserver tokens, and triggers the recursive-make detection that prints 'make[1]: Entering directory ...' on entry. Caught by GitHub Copilot in PR 109 review: #109 (comment)
c5d0048 to
2e0d407
Compare
printminion-co
added a commit
that referenced
this pull request
May 12, 2026
Plain 'make build_css' inside the recipe is the wrong form for a recursive build: it doesn't inherit the jobserver from the parent make invocation, so when the Makefile is driven with 'make -j' (or from a parent build that already holds jobserver tokens) the inner make either prints 'warning: jobserver unavailable' or silently loses parallel scheduling. Replace it with $(MAKE), which GNU Make documents as the canonical form for recursive invocations — it propagates MAKEFLAGS, jobserver tokens, and triggers the recursive-make detection that prints 'make[1]: Entering directory ...' on entry. Caught by GitHub Copilot in PR 109 review: #109 (comment)
d7d5dd3 to
a962209
Compare
printminion-co
added a commit
that referenced
this pull request
May 12, 2026
Plain 'make build_css' inside the recipe is the wrong form for a recursive build: it doesn't inherit the jobserver from the parent make invocation, so when the Makefile is driven with 'make -j' (or from a parent build that already holds jobserver tokens) the inner make either prints 'warning: jobserver unavailable' or silently loses parallel scheduling. Replace it with $(MAKE), which GNU Make documents as the canonical form for recursive invocations — it propagates MAKEFLAGS, jobserver tokens, and triggers the recursive-make detection that prints 'make[1]: Entering directory ...' on entry. Caught by GitHub Copilot in PR 109 review: #109 (comment)
a962209 to
58c35cd
Compare
printminion-co
added a commit
that referenced
this pull request
May 12, 2026
Plain 'make build_css' inside the recipe is the wrong form for a recursive build: it doesn't inherit the jobserver from the parent make invocation, so when the Makefile is driven with 'make -j' (or from a parent build that already holds jobserver tokens) the inner make either prints 'warning: jobserver unavailable' or silently loses parallel scheduling. Replace it with $(MAKE), which GNU Make documents as the canonical form for recursive invocations — it propagates MAKEFLAGS, jobserver tokens, and triggers the recursive-make detection that prints 'make[1]: Entering directory ...' on entry. Caught by GitHub Copilot in PR 109 review: #109 (comment)
58c35cd to
862d29e
Compare
printminion-co
added a commit
that referenced
this pull request
May 12, 2026
Plain 'make build_css' inside the recipe is the wrong form for a recursive build: it doesn't inherit the jobserver from the parent make invocation, so when the Makefile is driven with 'make -j' (or from a parent build that already holds jobserver tokens) the inner make either prints 'warning: jobserver unavailable' or silently loses parallel scheduling. Replace it with $(MAKE), which GNU Make documents as the canonical form for recursive invocations — it propagates MAKEFLAGS, jobserver tokens, and triggers the recursive-make detection that prints 'make[1]: Entering directory ...' on entry. Caught by GitHub Copilot in PR 109 review: #109 (comment)
862d29e to
953e639
Compare
Adds the generate_apps_matrix_json target that emits the CI build matrix from the canonical app-list variables, then refactors the target to use the dynamic app-list pattern shared with the rest of the Makefile so the matrix never drifts from the build inputs.
…mon vars Replaces hand-written per-app build recipes with define macros: - build_custom_npm_app / build_custom_composer_app / build_external_full_app generate dynamic %-suffix rules over CUSTOM_NPM_TARGETS, CUSTOM_COMPOSER_TARGETS and EXTERNAL_FULL_TARGETS. - Verbose [i]/[✓] log output is wired into every recipe so the CI log reads consistently across categories. - `make help` lists targets category-by-category and reflects the dynamic app set. - build_nc_theming_app uses $(MAKE) for the recursive build so flags and jobserver state propagate.
Introduces the .precheck sentinel target that verifies preconditions (IONOS-side inputs available, .buildnumber tracked in clean, build completion summary printed) before any IO-side target runs, so a missing .buildnumber or unfetched submodule fails fast with a clear message instead of producing a half-built package.
Adds scripts/patch_shipped_json_add_shipped_apps.sh and wires it into a two-phase patch_shipped_json target: phase 1 patches the bundled shipped.json with apps under APP_FOLDERS_TO_SHIP, phase 2 layers in any IONOS-specific overrides. Splitting the work keeps both phases scriptable and lets CI verify the result between phases.
…ps.txt Add a runtime-evaluated REMOVE_UNWANTED_APPS variable that reads IONOS/removed-apps.txt (skipping comments and blanks) and prefixes each entry with apps/. The result is fed to zip_dependencies via $(foreach app,$(REMOVE_UNWANTED_APPS),-x "$(app)/*"), so removed apps disappear from the final package without editing the Makefile. removed-apps.txt is created empty (header comment only) so the foreach expands to nothing today.
…age_after_build
Two new targets for staged CI pipelines that build external apps in a
separate job:
build_after_external_apps : build_nextcloud + add_config_partials
(runs after the external-apps matrix
finishes — does NOT rebuild them)
package_after_build : alias for zip_dependencies, named to make
the pipeline stage intent obvious
The existing build_release / build_locally aggregates are unchanged.
…pps + validate_all umbrella Adds two validation scripts and Makefile wiring: - scripts/validate_app_list_uniqueness.sh — fails the build if an app appears in more than one category list (e.g., both custom and external), since duplicates break the matrix generator. - scripts/validate_external_apps.sh — verifies every entry in EXTERNAL_FULL_TARGETS actually exists under apps-external/ with a buildable appinfo, catching submodule drift. - validate_all — umbrella target that runs both, plus a final '[i] Package … created successfully' line in zip_dependencies so the CI log clearly marks the end of packaging.
953e639 to
797b3c7
Compare
seriAlizations
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebuilds the HiDrive Next
IONOS/Makefilefrom hardcoded per-app targets into a category-list + dynamic-pattern style, and adopts the structural patterns from sister-repo ncw-config.Serves the cached matrix CI pipeline in IONOS-Productivity/nc-server#226.
What's new vs. the original PR 109
Beyond the original PR 109's scope (category lists, dynamic matrix, define macros, .precheck, app-list uniqueness validation, buildnumber guard), this version also lifts these patterns from ncw-config:
--no-interaction,--prefer-offline --no-audit.APP_FOLDERS_TO_SHIP=apps-external apps-custom(HiDrive Next ships both) wired intopatch_shipped_jsonvia the newpatch_shipped_json_add_shipped_apps.shpatcher.REMOVE_UNWANTED_APPSdriven byIONOS/removed-apps.txt; expands to-x "apps/<name>/*"exclusions inzip_dependencies.build_after_external_appsandpackage_after_buildfor staged CI workflows.validate_external_appstarget + script — walks bothapps-custom/andapps-external/, suggests the right category per app, and reports apps that exist on disk but aren't in any list.validate_allumbrella target chaining both validations through$(MAKE).[i]/[✓]log output in every recipe (build macros, theming/theme specials,add_config_partials,zip_dependencies,clean,build_nextcloud_*).cleanalso removes.buildnumber+ trailing[✓] Clean completed.2025 STRATO GmbH.$(MAKE)for recursive build inbuild_nc_theming_app(Phase D) — caught by Copilot in PR review.Category split (final)
CUSTOM_NPM_APPSsimplesettingsapps-custom/CUSTOM_COMPOSER_APPSnc_ionos_processesapps-custom/EXTERNAL_FULL_APPSrichdocuments user_oidc viewerapps-external/SPECIAL_BUILD_APPSnc_theming nc-ionos-themeapps-custom/+themes/What was not lifted from ncw-config
ncw-server-specific patterns kept out because HiDrive Next doesn't need them:
notify_pushbinary handling (ARCHITECTURE,NOTIFY_PUSH_*, the binary download/checksum target,build_notify_push_*).FULL_BUILD_APPS,COMPOSER_ONLY_APPS,COMPOSER_NO_SCRIPTS_APPS, …) — HiDrive Next's smaller app set fits cleanly into 4 lists.build_core_app_theming,build_ncw,build_all_external_appsaggregates.generate_external_apps_matrix) — we only emit JSON.MAKEFLAGSparallel-jobs / load-average cap — deferred; can land in a follow-up if needed.Verification done locally
make helplists every category and validation/matrix target.make generate_apps_matrix_json | jq -r '.[].name'emits the expected 7 entries, sorted.make validate_app_list_uniquenesspasses.make validate_external_appsruns and surfaces apps on disk that aren't yet in any list (real finding — see follow-up note below).Related