-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.sh
executable file
·53 lines (45 loc) · 1.41 KB
/
main.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
#!/bin/bash
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
locale
curl -o "./$AC_APP_FILE_NAME" -k "$AC_APP_FILE_URL"
ls -lh
file_path="./$AC_APP_FILE_NAME"
if [ -e "$file_path" ]; then
file_size=$(du -h "$file_path" | cut -f1)
echo "File exists: $file_path"
echo "File size: $file_size"
else
echo "File does not exist: $file_path"
fi
bundle init
echo "gem \"fastlane\"">>Gemfile
bundle install
mkdir fastlane
touch fastlane/Appfile
touch fastlane/Fastfile
if [ -f "$AC_RELEASE_NOTES_FILE" ]; then
echo "Found change log in AC_RELEASE_NOTES, copying to fastlane/metadata/android/en-us/changelogs/default.txt"
mkdir -p "fastlane/metadata/android/en-us/changelogs"
cp "$AC_RELEASE_NOTES_FILE" "fastlane/metadata/android/en-us/changelogs/default.txt"
else
echo "Warning: AC_RELEASE_NOTES_FILE is not found, changelog will be skipped."
fi
mv "$AC_FASTFILE_CONFIG" "fastlane/Fastfile"
mv "$AC_APP_FILE_CONFIG" "fastlane/Appfile"
mv "$AC_API_KEY" "$AC_API_KEY_FILE_NAME"
if [[ "$AC_BINARY_FILE_TYPE" == "apk" ]] ; then
bundle exec fastlane upload_apk --verbose
fi
if [[ "$AC_BINARY_FILE_TYPE" == "aab" ]] ; then
bundle exec fastlane upload_aab --verbose
fi
if [ $? -eq 0 ]
then
echo "Google Play Console progress succeeded"
exit 0
else
echo "Google Play Console progress failed :" >&2
exit 1
fi