-
Notifications
You must be signed in to change notification settings - Fork 5
/
release.sh
executable file
·69 lines (53 loc) · 1.45 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash
setup () {
flutter clean
flutter pub get
flutter pub pub run intl_translation:extract_to_arb --output-dir=lib/l10n lib/l10n/strings.dart
flutter pub pub run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/l10n/strings.dart lib/l10n/intl_messages.arb lib/l10n/intl_ja.arb
flutter pub pub run build_runner build --delete-conflicting-outputs
dart tool/env.dart
}
buildIos() {
flutter -v build ios -t lib/application/main_production.dart # --no-codesign
}
deployToAppStore() {
cd ios && bundle exec fastlane prod
}
deployToDeployGate() {
cd ios && bundle exec fastlane gym --export_method ad-hoc --scheme Runner && bundle exec fastlane dg
}
buildApk() {
flutter build apk -t lib/application/main_production.dart --release --flavor production #--target-platform=android-arm64
}
deployToPlayStore() {
cd android && bundle exec fastlane beta
}
CMDNAME=`basename $0`
#if [ $# -ne 1 ]; then
# echo "Usage: $CMDNAME ios or apk" 1>&2
# exit 1
#fi
if [ $1 = "setup" ]; then
setup
exit 0
fi
if [ $1 = "ios" ]; then
setup
buildIos
if [ $2 = "deploygate" ]; then
deployToDeployGate
fi
if [ $2 = "appstore" ]; then
deployToAppStore
fi
echo "終了"
elif [ $1 = "apk" ]; then
setup
buildApk
if [ $2 = "playstore" ]; then
deployToPlayStore
fi
echo "終了"
else
echo "iosかapkを指定してください。"
fi