From 3c62e1e04bcff75f024d6eb335b474cab2c40ae1 Mon Sep 17 00:00:00 2001 From: Martin Bauer Date: Sat, 28 Oct 2023 14:05:54 +0200 Subject: [PATCH] doc files and deployment --- .expo/README.md | 15 +++++++++++++++ .expo/settings.json | 8 ++++++++ deploy-app.py | 9 ++++----- doc/devices.md | 2 ++ doc/howto_local_android_build.md | 16 ++++++++++++++++ 5 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 .expo/README.md create mode 100644 .expo/settings.json create mode 100644 doc/devices.md diff --git a/.expo/README.md b/.expo/README.md new file mode 100644 index 0000000..fd146b4 --- /dev/null +++ b/.expo/README.md @@ -0,0 +1,15 @@ +> Why do I have a folder named ".expo" in my project? + +The ".expo" folder is created when an Expo project is started using "expo start" command. + +> What do the files contain? + +- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds. +- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator. +- "settings.json": contains the server configuration that is used to serve the application manifest. + +> Should I commit the ".expo" folder? + +No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine. + +Upon project creation, the ".expo" folder is already added to your ".gitignore" file. diff --git a/.expo/settings.json b/.expo/settings.json new file mode 100644 index 0000000..92bc513 --- /dev/null +++ b/.expo/settings.json @@ -0,0 +1,8 @@ +{ + "hostType": "lan", + "lanType": "ip", + "dev": true, + "minify": false, + "urlRandomness": null, + "https": false +} diff --git a/deploy-app.py b/deploy-app.py index 3a95017..05dfa98 100644 --- a/deploy-app.py +++ b/deploy-app.py @@ -9,12 +9,12 @@ import tempfile # --------------------------------------------- Config ---------------------------------------------------------- -NODE_PATH = "/home/martin/node-v14.17.0-linux-x64/bin" -JDK8_PATH = "/usr/lib/jvm/java-8-openjdk-amd64/bin/" +NODE_PATH = "/home/martin/node-v18.18.0-linux-x64/bin" +JDK8_PATH = "/usr/lib/jvm/java-11-openjdk-amd64/bin/" PUBLIC_URL = "https://swimtracker.bauer.tech" DEPLOY_HOST = "server" -DEPLOY_PATH = "/volumes/swimtracker" +DEPLOY_PATH = "/docker/web/volumes/static-sites/swimtracker" APP_UPDATE_FOLDER = "app-update" APP_FOLDER = "app" @@ -90,8 +90,7 @@ def deploy_apk_update_files(): def deploy_apk(): with tempfile.TemporaryDirectory() as tmpdirname: apk_file = os.path.join(tmpdirname, "app.apk") - cmd = ["turtle", "build:android", "--type", "apk", "--public-url", android_idx_url, - "-o", apk_file] + cmd = ["eas", "build", "--platform", "android", "--local", "--profile", "production", "--output", "app.apk"] subprocess.check_call(cmd, env=env_with_node_path) target_file = os.path.join(DEPLOY_PATH, APP_FOLDER, f"swimtracker-{version_name}.apk") scp.put(apk_file, target_file) diff --git a/doc/devices.md b/doc/devices.md new file mode 100644 index 0000000..b0943d6 --- /dev/null +++ b/doc/devices.md @@ -0,0 +1,2 @@ +swimtracker-4525a0 Garten +swimtracker-452700 Testgerat \ No newline at end of file diff --git a/doc/howto_local_android_build.md b/doc/howto_local_android_build.md index 52a09f4..6e1241d 100644 --- a/doc/howto_local_android_build.md +++ b/doc/howto_local_android_build.md @@ -12,3 +12,19 @@ scp -r dist/* root@server:"/volumes/swimtracker/app-update/" apt install openjdk-8-jdk-headless export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:$PATH turtle build:android --type apk --public-url https://swimtracker.bauer.tech/app-update/android-index.json -o app.apk + + + + + + +# New + + +npm install -g eas-cli + + +# check eas.json from profiles +eas build --platform android --local --profile production + +eas build --platform android --local --profile preview --output swimtracker-0.1.apk \ No newline at end of file