Skip to content

Commit

Permalink
Check if the directory to upload is a flutter directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tchavetdeuse committed Sep 1, 2022
1 parent 6f01830 commit 6517c10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
v0.2.1
- CLI: Exclude unnecessary directories when sending code
- CLI: Check if the directory to upload is a flutter directory
- CLI: Bug fixes
v0.2.0
- CLI: Added choice picker for some options when no value was provided
Expand Down
5 changes: 5 additions & 0 deletions src/appollo/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ def start(build_type, flutter, minimal_ios_version, app_version, build_number, n
if directory is None:
directory = os.getcwd()

if not os.path.exists(os.path.join(directory, "lib")) or not os.path.exists(os.path.join(directory, "pubspec.yaml")):
res = console.input("This directory does not look like it contains a flutter project. Are you sure you want to upload it? (y/N) ")
if res not in ["y", "Y"]:
return

if app_key is None:
app_key = terminal_menu("/applications/", "Application",
does_not_exist_msg=Text.from_markup(textwrap.dedent(
Expand Down

0 comments on commit 6517c10

Please sign in to comment.