diff --git a/Makefile b/Makefile index 2258fcf..1efe21c 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,12 @@ COMPOSER_ONLY_APPS = \ # App directories that need only composer but with --no-scripts (to avoid dev-only composer script issues) # These apps have @composer bin commands in post-install-cmd but the bamarni/composer-bin-plugin # is only in require-dev, so it fails when running with --no-dev -COMPOSER_NO_SCRIPTS_APPS = \ +# Intentionally left empty: currently, no apps require composer with --no-scripts only. +COMPOSER_NO_SCRIPTS_APPS = + +# App directories that need composer with --no-scripts AND npm build +# These apps have composer script issues with --no-dev but still need npm build +COMPOSER_NO_SCRIPTS_WITH_NPM_APPS = \ forms \ password_policy \ twofactor_totp @@ -77,6 +82,7 @@ REMOVE_UNWANTED_APPS = $(shell [ -f IONOS/removed-apps.txt ] && sed '/^#/d;/^$$/ FULL_BUILD_TARGETS = $(patsubst %,build_%_app,$(FULL_BUILD_APPS)) COMPOSER_ONLY_TARGETS = $(patsubst %,build_%_app,$(COMPOSER_ONLY_APPS)) COMPOSER_NO_SCRIPTS_TARGETS = $(patsubst %,build_%_app,$(COMPOSER_NO_SCRIPTS_APPS)) +COMPOSER_NO_SCRIPTS_WITH_NPM_TARGETS = $(patsubst %,build_%_app,$(COMPOSER_NO_SCRIPTS_WITH_NPM_APPS)) NOTHING_TO_BUILD_TARGETS = $(patsubst %,build_%_app,$(NOTHING_TO_BUILD_APPS)) SPECIAL_BUILD_TARGETS = $(patsubst %,build_%_app,$(SPECIAL_BUILD_APPS)) @@ -85,7 +91,7 @@ SPECIAL_BUILD_TARGETS = $(patsubst %,build_%_app,$(SPECIAL_BUILD_APPS)) # Main Nextcloud build .PHONY: build_ncw # Applications - dynamically generated -.PHONY: build_all_external_apps build_notify_push_binary build_core_app_theming $(FULL_BUILD_TARGETS) $(COMPOSER_ONLY_TARGETS) $(COMPOSER_NO_SCRIPTS_TARGETS) $(NOTHING_TO_BUILD_TARGETS) $(SPECIAL_BUILD_TARGETS) +.PHONY: build_all_external_apps build_notify_push_binary build_core_app_theming $(FULL_BUILD_TARGETS) $(COMPOSER_ONLY_TARGETS) $(COMPOSER_NO_SCRIPTS_TARGETS) $(COMPOSER_NO_SCRIPTS_WITH_NPM_TARGETS) $(NOTHING_TO_BUILD_TARGETS) $(SPECIAL_BUILD_TARGETS) # Configuration and packaging .PHONY: add_config_partials patch_shipped_json version.json zip_dependencies # Pipeline targets for GitLab workflow @@ -110,6 +116,8 @@ help: ## This help. @for app in $(COMPOSER_ONLY_APPS); do printf "\033[36m%-30s\033[0m Build $$app app (composer only)\n" "build_$${app}_app"; done @echo " Composer-only apps (no scripts):" @for app in $(COMPOSER_NO_SCRIPTS_APPS); do printf "\033[36m%-30s\033[0m Build $$app app (composer no scripts)\n" "build_$${app}_app"; done + @echo " Composer (no scripts) + npm build apps:" + @for app in $(COMPOSER_NO_SCRIPTS_WITH_NPM_APPS); do printf "\033[36m%-30s\033[0m Build $$app app (composer no scripts + npm)\n" "build_$${app}_app"; done @echo " Nothing to build apps:" @for app in $(NOTHING_TO_BUILD_APPS); do printf "\033[36m%-30s\033[0m Nothing to build for $$app app\n" "build_$${app}_app"; done @echo "" @@ -191,6 +199,16 @@ define build_composer_no_scripts_app @echo "[✓] $(1) app built successfully" endef +# Common function to build apps with composer (no scripts) plus npm build +define build_composer_no_scripts_with_npm_app + @echo "[i] Building $(1) app (no scripts + npm)..." + @cd apps-external/$(1) && \ + composer install --no-dev -o --no-interaction --no-scripts && \ + $(NPM_INSTALL) && \ + $(NPM_BUILD) + @echo "[✓] $(1) app built successfully" +endef + build_core_app_theming: .precheck ## Build theming app @echo "[i] Building theming app..." cd apps/theming/composer && \ @@ -215,6 +233,10 @@ $(COMPOSER_ONLY_TARGETS): build_%_app: $(COMPOSER_NO_SCRIPTS_TARGETS): build_%_app: $(call build_composer_no_scripts_app,$(patsubst build_%_app,%,$@)) +# Dynamic rules for composer-only apps with --no-scripts plus npm build +$(COMPOSER_NO_SCRIPTS_WITH_NPM_TARGETS): build_%_app: + $(call build_composer_no_scripts_with_npm_app,$(patsubst build_%_app,%,$@)) + # Dynamic rules for apps with nothing to build $(NOTHING_TO_BUILD_TARGETS): build_%_app: @echo "[i] Nothing to build for $$(patsubst build_%_app,%,$@) app" @@ -315,7 +337,7 @@ zip_dependencies: patch_shipped_json version.json ## Zip relevant files @echo "[i] Package $(TARGET_PACKAGE_NAME) created successfully" # Parallel build targets -build_all_external_apps: $(FULL_BUILD_TARGETS) $(COMPOSER_ONLY_TARGETS) $(COMPOSER_NO_SCRIPTS_TARGETS) $(NOTHING_TO_BUILD_TARGETS) $(SPECIAL_BUILD_TARGETS) ## Build all external apps +build_all_external_apps: $(FULL_BUILD_TARGETS) $(COMPOSER_ONLY_TARGETS) $(COMPOSER_NO_SCRIPTS_TARGETS) $(COMPOSER_NO_SCRIPTS_WITH_NPM_TARGETS) $(NOTHING_TO_BUILD_TARGETS) $(SPECIAL_BUILD_TARGETS) ## Build all external apps @echo "[i] All external apps built successfully" build_after_external_apps: build_ncw add_config_partials ## Build NCW and add configs after external apps are done @@ -342,6 +364,7 @@ validate_external_apps: .precheck ## Validate and suggest proper categorization "$(FULL_BUILD_APPS)" \ "$(COMPOSER_ONLY_APPS)" \ "$(COMPOSER_NO_SCRIPTS_APPS)" \ + "$(COMPOSER_NO_SCRIPTS_WITH_NPM_APPS)" \ "$(NOTHING_TO_BUILD_APPS)" \ "$(SPECIAL_BUILD_APPS)" @@ -350,6 +373,7 @@ validate_app_list_uniqueness: .precheck ## Validate that apps are only in one li "$(FULL_BUILD_APPS)" \ "$(COMPOSER_ONLY_APPS)" \ "$(COMPOSER_NO_SCRIPTS_APPS)" \ + "$(COMPOSER_NO_SCRIPTS_WITH_NPM_APPS)" \ "$(NOTHING_TO_BUILD_APPS)" \ "$(SPECIAL_BUILD_APPS)" \ "$(MAKEFILE_LIST)" @@ -365,7 +389,7 @@ generate_external_apps_matrix: .precheck ## Generate external-apps-matrix.yml fi @echo "apps-external:" @bash -c ' \ # Process all configured apps \ - all_configured_apps="$(FULL_BUILD_APPS) $(COMPOSER_ONLY_APPS) $(COMPOSER_NO_SCRIPTS_APPS) $(NOTHING_TO_BUILD_APPS) $(SPECIAL_BUILD_APPS)"; \ + all_configured_apps="$(FULL_BUILD_APPS) $(COMPOSER_ONLY_APPS) $(COMPOSER_NO_SCRIPTS_APPS) $(COMPOSER_NO_SCRIPTS_WITH_NPM_APPS) $(NOTHING_TO_BUILD_APPS) $(SPECIAL_BUILD_APPS)"; \ # Sort apps alphabetically \ sorted_apps=$$(echo $$all_configured_apps | tr " " "\n" | sort | tr "\n" " "); \ for app in $$sorted_apps; do \ @@ -398,7 +422,7 @@ generate_external_apps_matrix_json: .precheck ## Generate external-apps-matrix.j @echo "[i] Generating external apps matrix JSON file..." >&2 @bash -c ' \ # Process all configured apps \ - all_configured_apps="$(FULL_BUILD_APPS) $(COMPOSER_ONLY_APPS) $(COMPOSER_NO_SCRIPTS_APPS) $(NOTHING_TO_BUILD_APPS) $(SPECIAL_BUILD_APPS)"; \ + all_configured_apps="$(FULL_BUILD_APPS) $(COMPOSER_ONLY_APPS) $(COMPOSER_NO_SCRIPTS_APPS) $(COMPOSER_NO_SCRIPTS_WITH_NPM_APPS) $(NOTHING_TO_BUILD_APPS) $(SPECIAL_BUILD_APPS)"; \ echo "["; \ first=true; \ found_any=false; \ diff --git a/scripts/validate_app_list_uniqueness.sh b/scripts/validate_app_list_uniqueness.sh index ebb1c4f..b544224 100755 --- a/scripts/validate_app_list_uniqueness.sh +++ b/scripts/validate_app_list_uniqueness.sh @@ -5,21 +5,22 @@ set -euo pipefail # This script validates that apps are only in one list and not duplicated by hardcoded targets -# Arguments: FULL_BUILD_APPS COMPOSER_ONLY_APPS COMPOSER_NO_SCRIPTS_APPS NOTHING_TO_BUILD_APPS SPECIAL_BUILD_APPS MAKEFILE_PATH +# Arguments: FULL_BUILD_APPS COMPOSER_ONLY_APPS COMPOSER_NO_SCRIPTS_APPS COMPOSER_NO_SCRIPTS_WITH_NPM_APPS NOTHING_TO_BUILD_APPS SPECIAL_BUILD_APPS MAKEFILE_PATH FULL_BUILD_APPS="$1" COMPOSER_ONLY_APPS="$2" COMPOSER_NO_SCRIPTS_APPS="$3" -NOTHING_TO_BUILD_APPS="$4" -SPECIAL_BUILD_APPS="$5" -MAKEFILE_PATH="$6" +COMPOSER_NO_SCRIPTS_WITH_NPM_APPS="$4" +NOTHING_TO_BUILD_APPS="$5" +SPECIAL_BUILD_APPS="$6" +MAKEFILE_PATH="$7" echo "[i] Validating app list uniqueness..." validation_failed=0 # Combine all apps into one list -all_apps="$FULL_BUILD_APPS $COMPOSER_ONLY_APPS $COMPOSER_NO_SCRIPTS_APPS $NOTHING_TO_BUILD_APPS $SPECIAL_BUILD_APPS" +all_apps="$FULL_BUILD_APPS $COMPOSER_ONLY_APPS $COMPOSER_NO_SCRIPTS_APPS $COMPOSER_NO_SCRIPTS_WITH_NPM_APPS $NOTHING_TO_BUILD_APPS $SPECIAL_BUILD_APPS" echo "[i] Checking for duplicate apps across lists..." echo "" @@ -47,17 +48,26 @@ for app in $all_apps; do fi done - # Check COMPOSER_NO_SCRIPTS_APPS - for cns_app in $COMPOSER_NO_SCRIPTS_APPS; do - if [ "$app" = "$cns_app" ]; then - count=$((count + 1)) - locations="$locations COMPOSER_NO_SCRIPTS_APPS" - break - fi - done - - # Check NOTHING_TO_BUILD_APPS - for ntb_app in $NOTHING_TO_BUILD_APPS; do + # Check COMPOSER_NO_SCRIPTS_APPS + for cns_app in $COMPOSER_NO_SCRIPTS_APPS; do + if [ "$app" = "$cns_app" ]; then + count=$((count + 1)) + locations="$locations COMPOSER_NO_SCRIPTS_APPS" + break + fi + done + + # Check COMPOSER_NO_SCRIPTS_WITH_NPM_APPS + for cnswn_app in $COMPOSER_NO_SCRIPTS_WITH_NPM_APPS; do + if [ "$app" = "$cnswn_app" ]; then + count=$((count + 1)) + locations="$locations COMPOSER_NO_SCRIPTS_WITH_NPM_APPS" + break + fi + done + + # Check NOTHING_TO_BUILD_APPS + for ntb_app in $NOTHING_TO_BUILD_APPS; do if [ "$app" = "$ntb_app" ]; then count=$((count + 1)) locations="$locations NOTHING_TO_BUILD_APPS" @@ -145,24 +155,26 @@ if [ $validation_failed -eq 0 ]; then echo "✅ No hardcoded targets conflict with dynamic lists" echo "✅ All special build apps have corresponding targets" else - echo "❌ Validation failed - please fix the issues above" - echo "" - echo "📋 GUIDELINES:" - echo "1. Each app must appear in ONLY ONE of these lists:" - echo " - FULL_BUILD_APPS" - echo " - COMPOSER_ONLY_APPS" - echo " - COMPOSER_NO_SCRIPTS_APPS" - echo " - NOTHING_TO_BUILD_APPS" - echo " - SPECIAL_BUILD_APPS" - echo "" - echo "2. Apps in FULL_BUILD_APPS, COMPOSER_ONLY_APPS, COMPOSER_NO_SCRIPTS_APPS, and NOTHING_TO_BUILD_APPS" - echo " use dynamic build rules and should NOT have hardcoded build__app targets" - echo "" - echo "3. Apps in SPECIAL_BUILD_APPS require custom build logic and MUST have" - echo " a hardcoded build__app target in the Makefile" - echo "" - echo "4. Currently excluded from conflict checks (known special cases):" - echo " - notify_push (has both hardcoded target and SPECIAL_BUILD_APPS entry)" - echo " - theming (core app with special handling)" - exit 1 + echo "❌ Validation failed - please fix the issues above" + echo "" + echo "📋 GUIDELINES:" + echo "1. Each app must appear in ONLY ONE of these lists:" + echo " - FULL_BUILD_APPS" + echo " - COMPOSER_ONLY_APPS" + echo " - COMPOSER_NO_SCRIPTS_APPS" + echo " - COMPOSER_NO_SCRIPTS_WITH_NPM_APPS" + echo " - NOTHING_TO_BUILD_APPS" + echo " - SPECIAL_BUILD_APPS" + echo "" + echo "2. Apps in FULL_BUILD_APPS, COMPOSER_ONLY_APPS, COMPOSER_NO_SCRIPTS_APPS," + echo " COMPOSER_NO_SCRIPTS_WITH_NPM_APPS, and NOTHING_TO_BUILD_APPS" + echo " use dynamic build rules and should NOT have hardcoded build__app targets" + echo "" + echo "3. Apps in SPECIAL_BUILD_APPS require custom build logic and MUST have" + echo " a hardcoded build__app target in the Makefile" + echo "" + echo "4. Currently excluded from conflict checks (known special cases):" + echo " - notify_push (has both hardcoded target and SPECIAL_BUILD_APPS entry)" + echo " - theming (core app with special handling)" + exit 1 fi diff --git a/scripts/validate_external_apps.sh b/scripts/validate_external_apps.sh index 190ffdd..f045568 100755 --- a/scripts/validate_external_apps.sh +++ b/scripts/validate_external_apps.sh @@ -5,13 +5,14 @@ set -euo pipefail # This script validates external apps and suggests proper categorization -# Arguments: FULL_BUILD_APPS COMPOSER_ONLY_APPS COMPOSER_NO_SCRIPTS_APPS NOTHING_TO_BUILD_APPS SPECIAL_BUILD_APPS +# Arguments: FULL_BUILD_APPS COMPOSER_ONLY_APPS COMPOSER_NO_SCRIPTS_APPS COMPOSER_NO_SCRIPTS_WITH_NPM_APPS NOTHING_TO_BUILD_APPS SPECIAL_BUILD_APPS FULL_BUILD_APPS="$1" COMPOSER_ONLY_APPS="$2" COMPOSER_NO_SCRIPTS_APPS="$3" -NOTHING_TO_BUILD_APPS="$4" -SPECIAL_BUILD_APPS="$5" +COMPOSER_NO_SCRIPTS_WITH_NPM_APPS="$4" +NOTHING_TO_BUILD_APPS="$5" +SPECIAL_BUILD_APPS="$6" echo "[i] Analyzing external apps to suggest proper build configuration..." echo "[i] Checking all apps in apps-external directory..." @@ -79,7 +80,7 @@ fi echo "" echo "[i] Checking configured apps for missing submodules..." -for app in $FULL_BUILD_APPS $COMPOSER_ONLY_APPS $COMPOSER_NO_SCRIPTS_APPS $NOTHING_TO_BUILD_APPS $SPECIAL_BUILD_APPS; do +for app in $FULL_BUILD_APPS $COMPOSER_ONLY_APPS $COMPOSER_NO_SCRIPTS_APPS $COMPOSER_NO_SCRIPTS_WITH_NPM_APPS $NOTHING_TO_BUILD_APPS $SPECIAL_BUILD_APPS; do if [ ! -d "apps-external/$app" ]; then echo " ❌ ERROR: App $app is configured but directory does not exist" validation_failed=1 @@ -164,25 +165,35 @@ for app in $all_apps; do done fi - if [ $is_configured -eq 0 ]; then - for composer_no_scripts_app in $COMPOSER_NO_SCRIPTS_APPS; do - if [ "$app" = "$composer_no_scripts_app" ]; then - current_config="COMPOSER_NO_SCRIPTS_APPS" - is_configured=1 - break - fi - done - fi + if [ $is_configured -eq 0 ]; then + for composer_no_scripts_app in $COMPOSER_NO_SCRIPTS_APPS; do + if [ "$app" = "$composer_no_scripts_app" ]; then + current_config="COMPOSER_NO_SCRIPTS_APPS" + is_configured=1 + break + fi + done + fi - if [ $is_configured -eq 0 ]; then - for nothing_app in $NOTHING_TO_BUILD_APPS; do - if [ "$app" = "$nothing_app" ]; then - current_config="NOTHING_TO_BUILD_APPS" - is_configured=1 - break - fi - done - fi + if [ $is_configured -eq 0 ]; then + for composer_no_scripts_with_npm_app in $COMPOSER_NO_SCRIPTS_WITH_NPM_APPS; do + if [ "$app" = "$composer_no_scripts_with_npm_app" ]; then + current_config="COMPOSER_NO_SCRIPTS_WITH_NPM_APPS" + is_configured=1 + break + fi + done + fi + + if [ $is_configured -eq 0 ]; then + for nothing_app in $NOTHING_TO_BUILD_APPS; do + if [ "$app" = "$nothing_app" ]; then + current_config="NOTHING_TO_BUILD_APPS" + is_configured=1 + break + fi + done + fi # Check for special apps with dedicated targets if [ $is_configured -eq 0 ]; then @@ -208,54 +219,65 @@ for app in $all_apps; do reasoning="" category_recommendation="" - if [ $has_composer -eq 0 ]; then - recommendation="⚠️ ERROR" - reasoning="No composer.json found - all apps must have composer.json" - category_recommendation="FIX REQUIRED" - validation_failed=1 - error_app_list="$error_app_list $app" - elif [ $needs_no_scripts -eq 1 ]; then - # If app needs --no-scripts, recommend COMPOSER_NO_SCRIPTS_APPS regardless of other factors - recommendation="✅ COMPOSER_NO_SCRIPTS_APPS" - category_recommendation="COMPOSER_NO_SCRIPTS_APPS" - reasoning="Has @composer bin command but bamarni plugin only in require-dev - needs --no-scripts flag" - elif [ $has_composer -eq 1 ] && [ $has_package -eq 0 ]; then - recommendation="✅ COMPOSER_ONLY_APPS" - category_recommendation="COMPOSER_ONLY_APPS" - reasoning="Has composer.json but no package.json - PHP-only app" - elif [ $has_composer -eq 1 ] && [ $has_package -eq 1 ]; then - if [ $has_build_script -eq 1 ]; then - recommendation="✅ FULL_BUILD_APPS" - category_recommendation="FULL_BUILD_APPS" - reasoning="Has composer.json + package.json + build script - requires full build pipeline" - else - recommendation="✅ COMPOSER_ONLY_APPS" - category_recommendation="COMPOSER_ONLY_APPS" - reasoning="Has package.json but no build script - likely dev dependencies only, treat as PHP-only" - fi - fi + if [ $has_composer -eq 0 ]; then + recommendation="⚠️ ERROR" + reasoning="No composer.json found - all apps must have composer.json" + category_recommendation="FIX REQUIRED" + validation_failed=1 + error_app_list="$error_app_list $app" + elif [ $needs_no_scripts -eq 1 ]; then + # If app needs --no-scripts, check if it also needs npm build + if [ $has_package -eq 1 ] && [ $has_build_script -eq 1 ]; then + recommendation="✅ COMPOSER_NO_SCRIPTS_WITH_NPM_APPS" + category_recommendation="COMPOSER_NO_SCRIPTS_WITH_NPM_APPS" + reasoning="Has @composer bin command but bamarni plugin only in require-dev + needs npm build" + else + recommendation="✅ COMPOSER_NO_SCRIPTS_APPS" + category_recommendation="COMPOSER_NO_SCRIPTS_APPS" + reasoning="Has @composer bin command but bamarni plugin only in require-dev - needs --no-scripts flag" + fi + elif [ $has_composer -eq 1 ] && [ $has_package -eq 0 ]; then + recommendation="✅ COMPOSER_ONLY_APPS" + category_recommendation="COMPOSER_ONLY_APPS" + reasoning="Has composer.json but no package.json - PHP-only app" + elif [ $has_composer -eq 1 ] && [ $has_package -eq 1 ]; then + if [ $has_build_script -eq 1 ]; then + recommendation="✅ FULL_BUILD_APPS" + category_recommendation="FULL_BUILD_APPS" + reasoning="Has composer.json + package.json + build script - requires full build pipeline" + else + recommendation="✅ COMPOSER_ONLY_APPS" + category_recommendation="COMPOSER_ONLY_APPS" + reasoning="Has package.json but no build script - likely dev dependencies only, treat as PHP-only" + fi + fi echo " Recommended Category: $recommendation" echo " Reasoning: $reasoning" - # Check if current config matches recommendation - config_correct=0 - if [ "$current_config" = "FULL_BUILD_APPS" ] && [ "$category_recommendation" = "FULL_BUILD_APPS" ]; then - config_correct=1 - elif [ "$current_config" = "COMPOSER_ONLY_APPS" ] && [ "$category_recommendation" = "COMPOSER_ONLY_APPS" ]; then - config_correct=1 - elif [ "$current_config" = "COMPOSER_NO_SCRIPTS_APPS" ] && [ "$category_recommendation" = "COMPOSER_NO_SCRIPTS_APPS" ]; then - config_correct=1 - elif [ "$current_config" = "COMPOSER_NO_SCRIPTS_APPS" ]; then - # COMPOSER_NO_SCRIPTS_APPS are always considered correctly configured (special case for composer script issues) - config_correct=1 - elif [ "$current_config" = "NOTHING_TO_BUILD_APPS" ]; then - # NOTHING_TO_BUILD_APPS are always considered correctly configured - config_correct=1 - elif echo "$current_config" | grep -q "SPECIAL"; then - # Special apps with dedicated targets are always considered correctly configured - config_correct=1 - fi + # Check if current config matches recommendation + config_correct=0 + if [ "$current_config" = "FULL_BUILD_APPS" ] && [ "$category_recommendation" = "FULL_BUILD_APPS" ]; then + config_correct=1 + elif [ "$current_config" = "COMPOSER_ONLY_APPS" ] && [ "$category_recommendation" = "COMPOSER_ONLY_APPS" ]; then + config_correct=1 + elif [ "$current_config" = "COMPOSER_NO_SCRIPTS_APPS" ] && [ "$category_recommendation" = "COMPOSER_NO_SCRIPTS_APPS" ]; then + config_correct=1 + elif [ "$current_config" = "COMPOSER_NO_SCRIPTS_WITH_NPM_APPS" ] && [ "$category_recommendation" = "COMPOSER_NO_SCRIPTS_WITH_NPM_APPS" ]; then + config_correct=1 + elif [ "$current_config" = "COMPOSER_NO_SCRIPTS_APPS" ]; then + # COMPOSER_NO_SCRIPTS_APPS are always considered correctly configured (special case for composer script issues) + config_correct=1 + elif [ "$current_config" = "COMPOSER_NO_SCRIPTS_WITH_NPM_APPS" ]; then + # COMPOSER_NO_SCRIPTS_WITH_NPM_APPS are always considered correctly configured + config_correct=1 + elif [ "$current_config" = "NOTHING_TO_BUILD_APPS" ]; then + # NOTHING_TO_BUILD_APPS are always considered correctly configured + config_correct=1 + elif echo "$current_config" | grep -q "SPECIAL"; then + # Special apps with dedicated targets are always considered correctly configured + config_correct=1 + fi if [ $is_configured -eq 0 ]; then echo " 🚨 ACTION REQUIRED: Add to Makefile" @@ -317,31 +339,37 @@ else echo " - Add missing apps as git submodules if they should exist" fi if [ $unconfigured_apps -gt 0 ]; then - echo "3. Review apps marked as ACTION REQUIRED:$unconfigured_app_list" - echo " Add these unconfigured apps to appropriate categories in the Makefile:" - echo "" - echo " For FULL_BUILD_APPS (apps with composer + npm + build script):" - echo " Add to line 29: FULL_BUILD_APPS = \\" - echo " existing_app \\" - echo " your_new_app \\" - echo " another_app" - echo "" - echo " For COMPOSER_ONLY_APPS (PHP-only apps):" - echo " Add to line 53: COMPOSER_ONLY_APPS = \\" - echo " existing_app \\" - echo " your_new_app \\" - echo " another_app" - echo "" - echo " For COMPOSER_NO_SCRIPTS_APPS (apps with composer scripts issues):" - echo " Add to line 60: COMPOSER_NO_SCRIPTS_APPS = \\" - echo " existing_app \\" - echo " your_new_app" - echo " (Use this for apps with @composer bin commands but bamarni plugin only in require-dev)" - echo "" - echo " For NOTHING_TO_BUILD_APPS (no build steps needed):" - echo " Add to line 66: NOTHING_TO_BUILD_APPS = \\" - echo " existing_app \\" - echo " your_new_app" + echo "3. Review apps marked as ACTION REQUIRED:$unconfigured_app_list" + echo " Add these unconfigured apps to appropriate categories in the Makefile:" + echo "" + echo " For FULL_BUILD_APPS (apps with composer + npm + build script):" + echo " Add to line 29: FULL_BUILD_APPS = \\" + echo " existing_app \\" + echo " your_new_app \\" + echo " another_app" + echo "" + echo " For COMPOSER_ONLY_APPS (PHP-only apps):" + echo " Add to line 53: COMPOSER_ONLY_APPS = \\" + echo " existing_app \\" + echo " your_new_app \\" + echo " another_app" + echo "" + echo " For COMPOSER_NO_SCRIPTS_APPS (apps with composer scripts issues, no npm):" + echo " Add to line 60: COMPOSER_NO_SCRIPTS_APPS = \\" + echo " existing_app \\" + echo " your_new_app" + echo " (Use this for apps with @composer bin commands but bamarni plugin only in require-dev)" + echo "" + echo " For COMPOSER_NO_SCRIPTS_WITH_NPM_APPS (apps with composer scripts issues + npm build):" + echo " Add to line 67: COMPOSER_NO_SCRIPTS_WITH_NPM_APPS = \\" + echo " existing_app \\" + echo " your_new_app" + echo " (Use this for apps with @composer bin/bamarni issues that also need npm build)" + echo "" + echo " For NOTHING_TO_BUILD_APPS (no build steps needed):" + echo " Add to line 73: NOTHING_TO_BUILD_APPS = \\" + echo " existing_app \\" + echo " your_new_app" fi if [ -n "$error_app_list" ]; then echo "4. Fix apps with errors:$error_app_list"