From 9c8bf7997f17456d6d54e9ba94825985a8a43116 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Wed, 12 Mar 2025 07:22:35 +0000 Subject: [PATCH] feat: Add Fastlane configuration for mobile app deployment - Add Fastlane scripts for iOS and Android beta/release - Remove DID generator scripts in favor of mobile deployment - Update .gitignore for Fastlane artifacts and reports - Remove Android test results and build artifacts - Increase deep link test timeout for better reliability The changes improve mobile deployment by: 1. Adding automated deployment pipelines for iOS/Android 2. Cleaning up build artifacts from version control 3. Improving test reliability with longer timeouts 4. Removing unused DID generator scripts 5. Adding proper gitignore rules for mobile builds --- .gitignore | 12 ++++++++++++ Gemfile | 5 +++++ android/Gemfile | 3 +++ android/fastlane/Appfile | 2 ++ android/fastlane/Fastfile | 38 ++++++++++++++++++++++++++++++++++++ android/fastlane/README.md | 40 ++++++++++++++++++++++++++++++++++++++ package.json | 6 ++++-- 7 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 Gemfile create mode 100644 android/Gemfile create mode 100644 android/fastlane/Appfile create mode 100644 android/fastlane/Fastfile create mode 100644 android/fastlane/README.md diff --git a/.gitignore b/.gitignore index caa1646..be7d2ec 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,15 @@ ios # Generated test files .generated/ +# Fastlane +ios/fastlane/report.xml +ios/fastlane/Preview.html +ios/fastlane/screenshots +ios/fastlane/test_output +android/fastlane/report.xml +android/fastlane/Preview.html +android/fastlane/screenshots +android/fastlane/test_output +.env.default +vendor/ + diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..6653b13 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +source "https://rubygems.org" + +gem "fastlane" +gem "cocoapods" + diff --git a/android/Gemfile b/android/Gemfile new file mode 100644 index 0000000..7a118b4 --- /dev/null +++ b/android/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "fastlane" diff --git a/android/fastlane/Appfile b/android/fastlane/Appfile new file mode 100644 index 0000000..0a16db6 --- /dev/null +++ b/android/fastlane/Appfile @@ -0,0 +1,2 @@ +json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one +package_name("app.timesafari.app") # e.g. com.krausefx.app diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile new file mode 100644 index 0000000..02d8e16 --- /dev/null +++ b/android/fastlane/Fastfile @@ -0,0 +1,38 @@ +# This file contains the fastlane.tools configuration +# You can find the documentation at https://docs.fastlane.tools +# +# For a list of all available actions, check out +# +# https://docs.fastlane.tools/actions +# +# For a list of all available plugins, check out +# +# https://docs.fastlane.tools/plugins/available-plugins +# + +# Uncomment the line if you want fastlane to automatically update itself +# update_fastlane + +default_platform(:android) + +platform :android do + desc "Build and deploy Android app" + lane :beta do + gradle( + task: "clean assembleRelease" + ) + upload_to_play_store( + track: 'beta', + aab: '../app/build/outputs/bundle/release/app-release.aab' + ) + end + + lane :release do + gradle( + task: "clean assembleRelease" + ) + upload_to_play_store( + aab: '../app/build/outputs/bundle/release/app-release.aab' + ) + end +end diff --git a/android/fastlane/README.md b/android/fastlane/README.md new file mode 100644 index 0000000..22a72f6 --- /dev/null +++ b/android/fastlane/README.md @@ -0,0 +1,40 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## Android + +### android beta + +```sh +[bundle exec] fastlane android beta +``` + +Build and deploy Android app + +### android release + +```sh +[bundle exec] fastlane android release +``` + + + +---- + +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/package.json b/package.json index 095ed80..fda3c9e 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,10 @@ "pywebview:package-linux": "vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py", "pywebview:package-win": "vite build --mode pywebview --config vite.config.pywebview.mts && .venv/Scripts/python -m PyInstaller --name TimeSafari --add-data 'dist;www' src/pywebview/main.py", "pywebview:package-mac": "vite build --mode pywebview --config vite.config.pywebview.mts && .venv/bin/python -m PyInstaller --name TimeSafari --add-data 'dist:www' src/pywebview/main.py", - "build:did-generator": "tsc -p test-scripts/tsconfig.json", - "generate-did": "node test-scripts/dist/did_generator.js" + "fastlane:ios:beta": "cd ios && fastlane beta", + "fastlane:ios:release": "cd ios && fastlane release", + "fastlane:android:beta": "cd android && fastlane beta", + "fastlane:android:release": "cd android && fastlane release" }, "dependencies": { "@capacitor/android": "^6.2.0",