Skip to content

Commit

Permalink
add shell-script for easy-build
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyun397 committed Feb 24, 2020
1 parent dc08f4a commit 9576e13
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
34 changes: 34 additions & 0 deletions build_android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

if [ -n "$2" ]; then
export BUILD_DIR_PATH=$2
else
export BUILD_DIR_PATH="$HOME/projects/virtual-flight-throttle/build"
fi

if [ -n "$3" ]; then
export BUNDLETOOL_PATH=$3
else
export BUNDLETOOL_PATH="$HOME/Android/bundletool-all-0.12.0.jar"
fi

echo "[i] start build appbundle..."

~/flutter/bin/flutter build appbundle
cp ./build/app/outputs/bundle/release/app-release.aab "$BUILD_DIR_PATH"/appbundle/vft-flight-throttle-"$1".aab

echo "[o] succeed build appbundle."

echo "[i]start build mono-apks..."

java -jar "$BUNDLETOOL_PATH" build-apks --bundle=./build/app/outputs/bundle/release/app-release.aab --output="$BUILD_DIR_PATH"/apk/vft-flight-throttle-"$1".apks --mode=universal
unzip "$BUILD_DIR_PATH"/apk/vft-flight-throttle-"$1".apks -d "$BUILD_DIR_PATH"/apk/

echo "[o] succeed build mono-apks."

rm "$BUILD_DIR_PATH"/apk/toc.pb
rm "$BUILD_DIR_PATH"/apk/vft-flight-throttle-"$1".apks

mv "$BUILD_DIR_PATH"/apk/universal.apk "$BUILD_DIR_PATH"/apk/vft-flight-throttle-"$1".apk

echo "[o] succeed build appbundle and apk with version $1"
14 changes: 14 additions & 0 deletions build_ios.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

if [ -n "$2" ]; then
export BUILD_DIR_PATH=$2
else
export BUILD_DIR_PATH="$HOME/projects/virtual-flight-throttle/build"
fi

echo "[i] start build ipa..."

~/flutter/bin/flutter build ipa
cp ./build/app/outputs/bundle/release/app-release.ipa "$BUILD_DIR_PATH"/ipa/vft-flight-throttle-"$1".ipa

echo "[o] succeed build ipa with version $1"

0 comments on commit 9576e13

Please sign in to comment.