Skip to content

Commit

Permalink
ci: [IOAPPX-469] Remove unused vars and lanes for iOS Fastlane config…
Browse files Browse the repository at this point in the history
…uration (#6638)

## Short description
This PR removes the env vars `ITUNES_USER` and `HOCKEYAPP_ALPHA_TOKEN`
and the related lane from the iOS fastlane configuration.

## List of changes proposed in this pull request
- Remove both env vars which are not defined anywhere at the moment; 
- Remove the deprecated HokeyApp lane;

## How to test
This can be tested by merging the PR before the next app release.

---------

Co-authored-by: Fabio Bombardi <[email protected]>
  • Loading branch information
LazyAfternoons and shadowsheep1 authored Feb 5, 2025
1 parent 5e79c2c commit ba2f462
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 219 deletions.
5 changes: 0 additions & 5 deletions ios/fastlane/Deliverfile

This file was deleted.

169 changes: 1 addition & 168 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand All @@ -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|

Expand Down Expand Up @@ -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|
Expand Down
88 changes: 42 additions & 46 deletions ios/fastlane/README.md
Original file line number Diff line number Diff line change
@@ -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).

0 comments on commit ba2f462

Please sign in to comment.