Skip to content

Commit b96f35d

Browse files
authored
app-upload flow fix (#23)
1 parent 7fa358a commit b96f35d

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

mac/common-utils.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,19 @@ handle_app_upload() {
102102
case $opt in
103103
"Use Sample App") choice="Use Sample App"; break ;;
104104
"Upload my App (.apk/.ipa)") choice="Upload my App"; break ;;
105-
"Cancel") choice="Cancel"; break ;;
106-
*) echo "Invalid option";;
105+
"Cancel") choice="Cancel";
106+
log_error "App upload cancelled by user."; exit 1;;
107+
*)
108+
log_error "App upload cancelled by user."; exit 1;;
109+
107110
esac
108111
done
109112
fi
110-
111-
if [[ "$choice" == *"Use Sample App"* ]]; then
113+
114+
if [[ "$choice" == "" ]]; then
115+
log_error "App upload cancelled by user."
116+
exit 1
117+
elif [[ "$choice" == *"Use Sample App"* ]]; then
112118
upload_sample_app
113119
app_platform="android"
114120
export APP_PLATFORM="$app_platform"
@@ -165,7 +171,8 @@ upload_custom_app() {
165171

166172
if [ -z "$file_path" ]; then
167173
log_msg_to "❌ No file selected"
168-
return 1
174+
log_error "App upload cancelled by user. No .apk /.ipa file path provided."
175+
exit 1
169176
fi
170177

171178
log_info "Selected file: $file_path"

mac/env-setup-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ setup_environment() {
1717
max_parallels=$TEAM_PARALLELS_MAX_ALLOWED_MOBILE
1818
fi
1919

20-
log_msg_to "Starting ${setup_type} setup for " "$tech_stack" "$NOW_RUN_LOG_FILE"
20+
log_msg_to "Starting ${setup_type} setup for $tech_stack" "$NOW_RUN_LOG_FILE"
2121

2222
local local_flag=false
2323

0 commit comments

Comments
 (0)