diff --git a/ios/fastlane/Deliverfile b/ios/fastlane/Deliverfile deleted file mode 100644 index 9a89556ca71..00000000000 --- a/ios/fastlane/Deliverfile +++ /dev/null @@ -1,5 +0,0 @@ -# The Deliverfile allows you to store various App Store Connect metadata -# For more information, check out the docs -# https://docs.fastlane.tools/actions/deliver/ - -username ENV["ITUNES_USER"] diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 57bba79b5dc..cca7d70c8ed 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -16,12 +16,6 @@ fastlane_version "2.28.5" default_platform :ios platform :ios do - before_all do - HOCKEYAPP_ALPHA_TOKEN = ENV["HOCKEYAPP_ALPHA_TOKEN"] - # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." - ITUNES_USER = ENV["ITUNES_USER"] - end - desc 'Fetch certificates and provisioning profiles' lane :certificates do # match(type: 'development') @@ -33,66 +27,9 @@ platform :ios do scan end - desc "Register new device" - lane :register_new_device do |options| - device_name = prompt(text: "Enter the device name: ") - device_udid = prompt(text: "Enter the device UDID: ") - device_hash = {} - device_hash[device_name] = device_udid - register_devices( - devices: device_hash - ) - refresh_profiles - end - - # A helper lane for refreshing provisioning profiles. - lane :refresh_profiles do - # match( - # type: "development", - # force: true) - match( - type: "adhoc", - force: true) - end - - # Builds the app without signing - lane :test_build do |options| - # Install pods - cocoapods - - # Build the app - xcodebuild( - workspace: "ItaliaApp.xcworkspace", - scheme: "ItaliaApp", - configuration: "Debug", - clean: options[:clean], - build: true, - destination: "generic/platform=iOS", - build_settings: { - "CODE_SIGNING_REQUIRED" => "NO", - "CODE_SIGN_IDENTITY" => "" - } - ) - end - - # Builds the app for ad-hoc releases (e.g. HockeyApp) - lane :do_adhoc_build do - # Install pods - cocoapods - - # build the app - gym( - scheme: "ItaliaApp", - clean: true, - export_method: "ad-hoc", - workspace: "ItaliaApp.xcworkspace", - include_symbols: false - ) - end - # Builds the app for TestFlight releases lane :do_testflight_build do - sync_code_signing(type: "appstore", username: ITUNES_USER) + sync_code_signing(type: "appstore") # Install pods cocoapods @@ -107,101 +44,6 @@ platform :ios do ) end - desc "Submit a new Beta Build to HockeyApp" - desc "This will also make sure the profile is up to date" - lane :beta do |options| - # Ensure that your git status is not dirty - ensure_git_status_clean - - # Increment the build number - build_number = get_build_number - - # Get the current version from the project - version_number = get_version_number - - # make sure to update the provisioning profile if necessary - # more information: https://codesigning.guide - match( - force_for_new_devices: true, - type: "adhoc" - ) - - do_adhoc_build - - # generate the changelog based on last commits - changelog = changelog_from_git_commits( - tag_match_pattern: "ios/beta/*" - ) - - versioning_paths = [ - "ItaliaApp.xcodeproj/project.pbxproj", - "ItaliaApp/Info.plist", - "ItaliaAppTests/Info.plist" - ] - # git_add(path: versioning_paths) - # git_commit(path: versioning_paths, message: "[fastlane] New iOS/HockeyApp build v#{version_number} (build #{build_number})") - - # Add a git tag for this build. This will automatically - # use an appropriate git tag name - # add_git_tag(tag: "ios/beta/#{version_number}/#{build_number}") - - # Push the new commit and tag back to your git remote - # push_to_git_remote - - # upload to HockeyApp - hockey( - api_token: HOCKEYAPP_ALPHA_TOKEN, - notes: changelog - ) - end - - desc "Submit a new Beta Build to TestFlight" - lane :beta_testflight do |options| - - # xCode 14.2, prevents altool to fail with error "Could not - # determine the package’s bundle ID" during the "pilot" step - # See https://github.com/fastlane/fastlane/issues/20741 - ENV['ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD'] = 'false' - - # Ensure that your git status is not dirty - ensure_git_status_clean - - # Increment the build number - build_number = get_build_number - - # Get the current version from the project - version_number = get_version_number - - do_testflight_build - - # generate the changelog based on last commits - changelog = changelog_from_git_commits( - tag_match_pattern: "ios/testflight/*" - ) - - versioning_paths = [ - "ItaliaApp.xcodeproj/project.pbxproj", - "ItaliaApp/Info.plist", - "ItaliaAppTests/Info.plist" - ] - # git_add(path: versioning_paths) - # git_commit(path: versioning_paths, message: "[fastlane] New iOS/TestFlight build v#{version_number} (build #{build_number}) [skip ci]") - - # Add a git tag for this build. This will automatically - # use an appropriate git tag name - # add_git_tag(tag: "ios/testflight/#{version_number}/#{build_number}") - - # Push the new commit and tag back to your git remote - # push_to_git_remote - - # upload to itunes store - pilot( - username: ITUNES_USER, - changelog: changelog, - skip_waiting_for_build_processing: true - ) - end - desc "Submit a new Beta Build to TestFlight" lane :beta_circleci_testflight do |options| @@ -332,15 +174,6 @@ platform :ios do ) end - desc "Deploy a new version to the App Store" - lane :release do - match(type: "appstore") - # snapshot - gym # Build your app - more options available - deliver(force: true) - # frameit - end - # You can define as many lanes as you want after_all do |lane| diff --git a/ios/fastlane/README.md b/ios/fastlane/README.md index 02bc25161ea..af9d79f964e 100644 --- a/ios/fastlane/README.md +++ b/ios/fastlane/README.md @@ -1,76 +1,72 @@ fastlane documentation -================ +---- + # Installation Make sure you have the latest version of the Xcode command line tools installed: -``` +```sh xcode-select --install ``` -Install _fastlane_ using -``` -[sudo] gem install fastlane -NV -``` -or alternatively using `brew install fastlane` +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) # Available Actions + ## iOS + ### ios certificates + +```sh +[bundle exec] fastlane ios certificates ``` -fastlane ios certificates -``` + Fetch certificates and provisioning profiles + ### ios test -``` -fastlane ios test -``` -Runs all the tests -### ios register_new_device -``` -fastlane ios register_new_device -``` -Register new device -### ios refresh_profiles -``` -fastlane ios refresh_profiles -``` -### ios test_build -``` -fastlane ios test_build +```sh +[bundle exec] fastlane ios test ``` -### ios do_adhoc_build -``` -fastlane ios do_adhoc_build -``` +Runs all the tests ### ios do_testflight_build -``` -fastlane ios do_testflight_build -``` -### ios beta +```sh +[bundle exec] fastlane ios do_testflight_build ``` -fastlane ios beta -``` -Submit a new Beta Build to HockeyApp -This will also make sure the profile is up to date -### ios beta_testflight -``` -fastlane ios beta_testflight + + +### ios beta_circleci_testflight + +```sh +[bundle exec] fastlane ios beta_circleci_testflight ``` + Submit a new Beta Build to TestFlight -### ios release + +### ios canary_ci_testflight + +```sh +[bundle exec] fastlane ios canary_ci_testflight ``` -fastlane ios release + +Submit a new Canary Build to TestFlight + +### ios distribute_beta_testflight + +```sh +[bundle exec] fastlane ios distribute_beta_testflight ``` -Deploy a new version to the App Store + +Distribute previously uploaded beta to TestFlight, using GA ---- -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). +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).