Skip to content

Commit 3ef7a83

Browse files
committed
fix(cross): fix api genereation issue by removing it
1 parent e923324 commit 3ef7a83

2 files changed

Lines changed: 2 additions & 36 deletions

File tree

cross-platform/build.sh

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -56,45 +56,11 @@ fi
5656

5757
export PATH="$PATH:$FLUTTER_DIR/bin"
5858

59-
# --- Download Swagger JSON from backend ---
60-
echo "🔧 Downloading Swagger specification from backend..."
61-
SWAGGER_URL="http://backend-code.duckdns.org/dev/swagger.json"
62-
if ! curl -f -s -o swagger.json "$SWAGGER_URL"; then
63-
echo "⚠️ Failed to download swagger.json from $SWAGGER_URL"
64-
echo "📥 Attempting fallback: letting update_api.dart download it..."
65-
else
66-
echo "✅ Downloaded swagger.json successfully"
67-
fi
68-
69-
# --- Generate Lam7aApi package via Swagger ---
70-
echo "🔧 Generating OpenAPI client (Lam7aApi)..."
71-
if [ -f ./tools/update_api.dart ]; then
72-
# Check if local swagger.json exists
73-
if [ -f ./swagger.json ]; then
74-
echo "📄 Using swagger.json..."
75-
dart run ./tools/update_api.dart ./swagger.json
76-
else
77-
echo "📥 No swagger.json found, letting update_api.dart download it..."
78-
dart run ./tools/update_api.dart
79-
fi
80-
81-
if [ $? -ne 0 ]; then
82-
echo "❌ API generation failed"
83-
exit 1
84-
fi
85-
else
86-
echo "❌ update_api.dart not found"
87-
exit 1
88-
fi
89-
9059
# --- Flutter build steps ---
9160
cd lam7a
9261
echo "📦 Fetching dependencies..."
9362
flutter pub get --verbose
9463

95-
echo "🔨 Running build_runner to generate APIs..."
96-
flutter pub run build_runner build --delete-conflicting-outputs
97-
9864
echo "📱 Building Android APK..."
9965
flutter build apk --release --verbose
10066

cross-platform/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ gh release create "${RELEASE_TAG}" \
4040
APK_PATH="build/app/outputs/flutter-apk/app-release.apk"
4141
if [ -f "$APK_PATH" ]; then
4242
echo "📱 Uploading Android APK..."
43-
gh release upload "${RELEASE_TAG}" \
43+
gh release upload -- "${RELEASE_TAG}" \
4444
"$APK_PATH" \
4545
--repo "${OWNER_NAME}/${REPO_NAME}" \
4646
--clobber
@@ -53,7 +53,7 @@ fi
5353
IPA_PATH="build/ios/ipa/app-release.ipa"
5454
if [ -f "$IPA_PATH" ]; then
5555
echo "🍎 Uploading iOS IPA..."
56-
gh release upload "${RELEASE_TAG}" "$IPA_PATH" \
56+
gh release upload -- "${RELEASE_TAG}" "$IPA_PATH" \
5757
--repo "${OWNER_NAME}/${REPO_NAME}" --clobber
5858
echo "✅ iOS IPA uploaded."
5959
else

0 commit comments

Comments
 (0)