@@ -11,69 +11,48 @@ set -e
1111# - MOVING_TAG: Moving tag (latest/dev)
1212# =========================================
1313
14- echo " 🏗️ Starting build process..."
1514cd ../../app
1615
1716# --- Detect OS ---
1817if [[ " $OSTYPE " == " linux-gnu" * ]]; then
1918 OS_TYPE=" ubuntu"
20- echo " 🐧 Detected Ubuntu/Linux"
2119elif [[ " $OSTYPE " == " darwin" * ]]; then
2220 OS_TYPE=" macos"
23- echo " 🍎 Detected macOS"
2421else
25- echo " ❌ Unsupported OS: $OSTYPE "
2622 exit 1
2723fi
2824
2925# --- Ensure Node.js & npm ---
3026if ! command -v npm & > /dev/null; then
31- echo " 📦 Installing Node.js..."
3227 if [ " $OS_TYPE " = " ubuntu" ]; then
3328 sudo apt-get update
3429 sudo apt-get install -y nodejs npm
3530 elif [ " $OS_TYPE " = " macos" ]; then
3631 if ! command -v brew & > /dev/null; then
37- echo " 🍺 Installing Homebrew..."
38- /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
32+ /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
3933 eval " $( /opt/homebrew/bin/brew shellenv) "
4034 fi
4135 brew install node
4236 fi
43- else
44- echo " 📦 Node.js already installed."
4537fi
4638
4739# --- Ensure Flutter ---
4840FLUTTER_DIR=" $HOME /flutter"
4941
5042if ! command -v flutter & > /dev/null; then
51- echo " 🕊️ Installing Flutter to $FLUTTER_DIR ..."
5243 git clone -q https://github.com/flutter/flutter.git -b stable " $FLUTTER_DIR "
53- else
54- echo " 🕊️ Flutter already installed."
5544fi
5645
5746export PATH=" $PATH :$FLUTTER_DIR /bin"
5847
5948# --- Flutter build steps ---
6049cd lam7a
61- echo " 📦 Fetching dependencies..."
6250flutter pub get --verbose
6351
64- echo " 📱 Building Android APK..."
6552flutter build apk --release --verbose
6653
6754# --- Platform-specific builds ---
6855if [ " $OS_TYPE " = " macos" ]; then
69- echo " 🍎 Building iOS app..."
7056 flutter build ipa --release --no-codesign
71- echo " ✅ iOS IPA built successfully!"
72- echo " 📦 Path: build/ios/ipa/app-release.ipa"
73- elif [ " $OS_TYPE " = " ubuntu" ]; then
74- echo " 🐧 Ubuntu build complete (Android APK built)."
75- echo " 📦 Path: build/app/outputs/flutter-apk/app-release.apk"
7657fi
7758
78- echo " "
79- echo " ✅ Build process completed successfully!"
0 commit comments