From 8c9a35d917d8afff25e642322aad098162e1e9c4 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 29 Aug 2022 16:04:53 +1000 Subject: [PATCH 1/2] Extract share Fastlane parameters in constants --- fastlane/Fastfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index e86b96b5..e36ad9e9 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -1,5 +1,10 @@ # frozen_string_literal: true +BUILD_FOLDER = File.join(__dir__, '.build') +BUILD_LOG_PATH = File.join(BUILD_FOLDER, 'logs') +DERIVED_DATA_PATH = File.join(BUILD_FOLDER, 'derived-data') +PROJECT_PATH = File.join(__dir__, 'TracksDemo', 'TracksDemo.xcodeproj') + default_platform(:ios) platform :ios do @@ -7,12 +12,12 @@ platform :ios do lane :test do run_tests( scheme: 'TracksDemo', - project: 'TracksDemo/TracksDemo.xcodeproj', + project: PROJECT_PATH, devices: ['iPhone 11'], deployment_target_version: '14.5', prelaunch_simulator: true, - buildlog_path: File.join(__dir__, '.build', 'logs'), - derived_data_path: File.join(__dir__, '.build', 'derived-data') + buildlog_path: BUILD_LOG_PATH, + derived_data_path: DERIVED_DATA_PATH ) end end @@ -22,9 +27,9 @@ platform :mac do lane :test do run_tests( scheme: 'TracksDemo Mac', - project: 'TracksDemo/TracksDemo.xcodeproj', - buildlog_path: File.join(__dir__, '.build', 'logs'), - derived_data_path: File.join(__dir__, '.build', 'derived-data') + project: PROJECT_PATH, + buildlog_path: BUILD_LOG_PATH, + derived_data_path: DERIVED_DATA_PATH ) end end From a7d666c9e822371f346ad35596f59d2cb01fe4c7 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 29 Aug 2022 16:06:10 +1000 Subject: [PATCH 2/2] Stop tracking `fastlane/README.md` --- .gitignore | 1 + fastlane/README.md | 38 -------------------------------------- 2 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 fastlane/README.md diff --git a/.gitignore b/.gitignore index 70040534..4a319a97 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,5 @@ Secrets.swift # Fastlane /fastlane/report.xml /fastlane/test_output +/fastlane/README.md .build diff --git a/fastlane/README.md b/fastlane/README.md deleted file mode 100644 index 9299d692..00000000 --- a/fastlane/README.md +++ /dev/null @@ -1,38 +0,0 @@ -fastlane documentation -================ -# Installation - -Make sure you have the latest version of the Xcode command line tools installed: - -``` -xcode-select --install -``` - -Install _fastlane_ using -``` -[sudo] gem install fastlane -NV -``` -or alternatively using `brew install fastlane` - -# Available Actions -## iOS -### ios test -``` -fastlane ios test -``` -Builds the project and runs tests - ----- - -## Mac -### mac test -``` -fastlane mac test -``` -Builds the project and runs tests - ----- - -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).