mirror of
https://github.com/DungeonPaper/dungeon-paper-app.git
synced 2026-05-18 01:59:04 +00:00
123 lines
5.0 KiB
YAML
123 lines
5.0 KiB
YAML
shell: /bin/zsh
|
|
scripts:
|
|
# ===============================================================================================
|
|
# Android
|
|
# ===============================================================================================
|
|
- name: android:build:apk
|
|
cmd: flutter build apk
|
|
description: Build Android APK only
|
|
- name: android:build:bundle
|
|
cmd: flutter build appbundle
|
|
description: Build Android unified bundle (for Play Store release)
|
|
- name: android:build:all
|
|
cmd: android:build:apk && android:build:bundle
|
|
description: Build Android unified bundle + standalone APK
|
|
- name: android:push
|
|
description: Push APK to ADB-connected device
|
|
cmd: |-
|
|
name=$(dart run btool get packageName)
|
|
version=$(dart run btool get packageVersion)
|
|
source="$(pwd)/build/app/outputs/flutter-apk/app-release.apk"
|
|
target="/sdcard/Download/$name-$version.apk"
|
|
adb push $source $target
|
|
- name: android:install
|
|
cmd: |-
|
|
adb uninstall app.dungeonpaper
|
|
adb install -r build/app/outputs/flutter-apk/app-release.apk
|
|
description: Install APK on Android (does not build)
|
|
- name: android:full
|
|
cmd: android:build:apk && android:push && android:install
|
|
description: Build, push and install APK to ADB connected device
|
|
- name: android:release
|
|
cmd: |-
|
|
name=$(dart run btool get packageName)
|
|
version=$(dart run btool get packageVersion)
|
|
symbols="symbols-$name-$version.zip"
|
|
bundleout="$name-$version.aab"
|
|
bundle=build/app/outputs/bundle/release/app-release.aab
|
|
mkdir -p release/android
|
|
android:build:bundle && symbols:collect && cp $bundle release/android/$bundleout
|
|
[[ ! -f "$(which open)" ]] || open release/android
|
|
description: Builds, collects debug symbols, and places the output in release/ dir.
|
|
|
|
# ===============================================================================================
|
|
# iOS
|
|
# ===============================================================================================
|
|
- name: ios:build:app
|
|
cmd: flutter build ios
|
|
description: Build iOS APP file
|
|
- name: ios:build:bundle
|
|
cmd: flutter build ipa
|
|
description: Build iOS IPA file
|
|
- name: ios:build:all
|
|
cmd: ios:build:app && ios:build:bundle
|
|
description: Build iOS IPA + APP
|
|
- name: ios:pod:update
|
|
cmd: pushd ios; pod repo update && pod install; popd
|
|
description: Install Pods for iOS
|
|
|
|
# ===============================================================================================
|
|
# macOS
|
|
# ===============================================================================================
|
|
- name: macos:build:app
|
|
cmd: flutter build macos
|
|
description: Build macOS App
|
|
- name: macos:build:all
|
|
cmd: macos:build:app
|
|
description: 'Alias for: Build macOS App'
|
|
- name: macos:pod:update
|
|
cmd: pushd macos; pod repo update && pod install; popd
|
|
description: Install Pods for macOS
|
|
|
|
# ===============================================================================================
|
|
# Web
|
|
# ===============================================================================================
|
|
- name: web:build
|
|
cmd: flutter pub add web:^0.4.0 && flutter build web && flutter pub remove web
|
|
description: Build Web app
|
|
- name: web:publish
|
|
cmd: firebase deploy --only hosting
|
|
description: Publish web version using Firebase (requires build)
|
|
- name: web:release
|
|
cmd: web:build && web:publish
|
|
descrition: Build & publish web version using Firebase
|
|
|
|
# ===============================================================================================
|
|
# All
|
|
# ===============================================================================================
|
|
- name: build
|
|
cmd: android:build:all && ios:build:all && macos:build:all && web:build:all
|
|
description: Build for all platforms
|
|
- name: apple:pod:update
|
|
cmd: macos:pod:update && ios:pod:update
|
|
description: Install Pods for macOS & iOS
|
|
|
|
# ===============================================================================================
|
|
# Utils
|
|
# ===============================================================================================
|
|
- name: format
|
|
cmd: dart format --line-length 120
|
|
description: Format all Dart files
|
|
- name: gen:icons
|
|
cmd: flutter pub run icons_launcher:create
|
|
description: Generate launcher icons
|
|
- name: intl:build
|
|
cmd: runner build -d
|
|
description: Build i18n files
|
|
- name: intl:watch
|
|
cmd: runner watch -d
|
|
description: Build u18n files in watch mode
|
|
- name: runner
|
|
cmd: dart run build_runner
|
|
description: Run Build Runner
|
|
- name: symbols:collect
|
|
cmd: |-
|
|
dir="$(pwd)/release/android"
|
|
name=$(dart run btool get packageName)
|
|
version=$(dart run btool get packageVersion)
|
|
filename="symbols-$name-$version.zip"
|
|
mkdir release
|
|
cd build/app/intermediates/merged_native_libs/release/out/lib
|
|
zip -r "$dir/$filename" */*
|
|
description: Create a zip of the debug symbols
|