Remove redundant build:capacitor:* script aliases
- Removed 24 redundant build:capacitor:* scripts that were just aliases - Kept essential build:capacitor and build:capacitor:sync scripts - Improves script clarity and reduces maintenance overhead - No functional changes to build processes
This commit is contained in:
@@ -59,6 +59,7 @@ CLEAN_ONLY=false
|
||||
SYNC_ONLY=false
|
||||
ASSETS_ONLY=false
|
||||
DEPLOY_APP=false
|
||||
AUTO_RUN=false
|
||||
|
||||
# Function to parse Android-specific arguments
|
||||
parse_android_args() {
|
||||
@@ -102,6 +103,9 @@ parse_android_args() {
|
||||
--deploy)
|
||||
DEPLOY_APP=true
|
||||
;;
|
||||
--auto-run)
|
||||
AUTO_RUN=true
|
||||
;;
|
||||
-h|--help)
|
||||
print_android_usage
|
||||
exit 0
|
||||
@@ -133,6 +137,7 @@ print_android_usage() {
|
||||
echo " --sync Sync Capacitor only"
|
||||
echo " --assets Generate assets only"
|
||||
echo " --deploy Deploy APK to connected device"
|
||||
echo " --auto-run Auto-run app after build"
|
||||
echo ""
|
||||
echo "Common Options:"
|
||||
echo " -h, --help Show this help message"
|
||||
@@ -142,6 +147,7 @@ print_android_usage() {
|
||||
echo " $0 --dev --studio # Development build + open studio"
|
||||
echo " $0 --prod --apk # Production APK build"
|
||||
echo " $0 --test --aab # Testing AAB build"
|
||||
echo " $0 --test --auto-run # Test build + auto-run"
|
||||
echo " $0 --clean # Clean only"
|
||||
echo " $0 --sync # Sync only"
|
||||
echo " $0 --deploy # Build and deploy to device"
|
||||
@@ -263,7 +269,18 @@ if [ "$BUILD_AAB" = true ]; then
|
||||
safe_execute "Building AAB" "cd android && ./gradlew bundleRelease && cd .." || exit 5
|
||||
fi
|
||||
|
||||
# Step 10: Open Android Studio if requested
|
||||
# Step 10: Auto-run app if requested
|
||||
if [ "$AUTO_RUN" = true ]; then
|
||||
log_step "Auto-running Android app..."
|
||||
safe_execute "Launching app" "npx cap run android" || {
|
||||
log_error "Failed to launch Android app"
|
||||
log_info "You can manually run with: npx cap run android"
|
||||
exit 9
|
||||
}
|
||||
log_success "Android app launched successfully!"
|
||||
fi
|
||||
|
||||
# Step 11: Open Android Studio if requested
|
||||
if [ "$OPEN_STUDIO" = true ]; then
|
||||
safe_execute "Opening Android Studio" "npx cap open android" || exit 8
|
||||
fi
|
||||
@@ -278,6 +295,9 @@ fi
|
||||
if [ "$BUILD_AAB" = true ]; then
|
||||
log_info "AAB build: completed"
|
||||
fi
|
||||
if [ "$AUTO_RUN" = true ]; then
|
||||
log_info "Auto-run: completed"
|
||||
fi
|
||||
if [ "$OPEN_STUDIO" = true ]; then
|
||||
log_info "Android Studio: opened"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user