From a16b51378a53b1efad19064f98580480c3f87bdf Mon Sep 17 00:00:00 2001 From: paribaker <58012003+paribaker@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:32:24 -0500 Subject: [PATCH] Upon generation remove mobile files (#345) Co-authored-by: Pari Work Temp Co-authored-by: William Huster --- .github/workflows/mobile.yml | 1 + hooks/post_gen_project.py | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 16a54cc2b..11d5ac676 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -47,6 +47,7 @@ jobs: publish: + if: needs.configuremobile.outputs.BUILD_MOBILE_APP != 0 needs: configuremobile runs-on: ubuntu-latest steps: diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 125d4242a..96586207d 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -82,6 +82,16 @@ def remove_mobile_client_files(client): rmtree(join(mobile_clients_path, client)) +def remove_special_mobile_files(): + file_names = [join("scripts/setup_mobile_config.sh")] + directories = [join("resources")] + for file in file_names: + if exists(file): + remove(file) + for directory in directories: + rmtree(directory) + + def move_mobile_client_to_root(client): if exists("mobile"): rmtree("mobile") @@ -164,6 +174,7 @@ def main(): move_mobile_client_to_root("react-native") else: remove_expo_yaml_files() + remove_special_mobile_files() clean_up_clients_folder()