Skip to content

Commit

Permalink
disable job in fastfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dhayab committed Feb 20, 2025
1 parent a57a8c5 commit 4ea018c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ These changes will be then pushed in a pull request, ready to be merged.

While both Swift Package Manager and Carthage rely on GitHub and git tags to retrieve the library, CocoaPods has its own repository.

[Starting from Xcode 14.3](https://github.com/CocoaPods/CocoaPods/issues/11839), the deployment will fail at the `pod_push` step, requiring the library to be manually published to the CocoaPods repository. InstantSearch iOS can be published to CocoaPods manually from an authorized user's local environment. Xcodes 14.2 cannot be used to build as it's incompatible with macOS Sonoma and up, but it's possible to [copy some of its files](https://github.com/CocoaPods/CocoaPods/issues/12033#issuecomment-2172608443) that are mistakenly required by CocoaPods for Podfile validation:
[Since Xcode 14.3](https://github.com/CocoaPods/CocoaPods/issues/11839), the deployment fails at the `pod_push` step, requiring the library to be manually published to the CocoaPods repository. The Fastlane deploy does not include this step anymore.

InstantSearch iOS should be published to CocoaPods manually from an authorized user's local environment. Xcode 14.2 cannot be used to build as it's incompatible with macOS Sonoma and up, but it's possible to [copy some of its files](https://github.com/CocoaPods/CocoaPods/issues/12033#issuecomment-2172608443) that are mistakenly required by CocoaPods for Podfile validation:

```bash
# Install Xcode 14.2 (here, using xcodes CLI)
Expand Down
34 changes: 19 additions & 15 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ lane :deploy do |options|
base_branch = options[:branch] || "master"

# ensure branch and cleanliness locally but not on Bitrise.
if !ENV['GITHUB_ACTION']
if !ENV['GITHUB_ACTION']
ensure_git_branch(
branch: base_branch
)
Expand Down Expand Up @@ -114,13 +114,15 @@ lane :deploy do |options|
sh("git tag -d #{release_type}; git push --delete origin #{release_type}")
end

pod_push(
path: podspec_path,
allow_warnings: true
)
# Disabled, manual CocoaPods release required.
# See CONTRIBUTING.md for more information.
# pod_push(
# path: podspec_path,
# allow_warnings: true
# )
end

lane :deployBeta do |options|
lane :deployBeta do |options|
branch = options[:branch] || "master"

pod_lib_lint(
Expand Down Expand Up @@ -149,10 +151,12 @@ lane :deployBeta do |options|
)
push_to_git_remote(remote: "origin")

pod_push(
path: "InstantSearch.podspec",
allow_warnings: true
)
# Disabled, manual CocoaPods release required.
# See CONTRIBUTING.md for more information.
# pod_push(
# path: "InstantSearch.podspec",
# allow_warnings: true
# )

end

Expand All @@ -164,14 +168,14 @@ def prepare_git(branch)
# ensure_git_branch(branch:branch)
masterHash = sh("git rev-parse origin/#{branch}")
headHash = sh("git rev-parse HEAD")
if masterHash != headHash

if masterHash != headHash
raise "Error: Master and Head Hashes do not match, meaning that we are probably not on Master and therefore can't deploy"
end

# checkout master to be able to push tag there.
sh("git checkout #{branch}")

# We already pull in bitrise before doing anything, so no need for this step anymore.
# git_pull
end
Expand All @@ -183,7 +187,7 @@ def prepare_api_keys()
if api_key
xcargs << %Q[ALGOLIA_API_KEY="#{api_key}"]
end

api_id = ENV["ALGOLIA_APPLICATION_ID"]
if api_id
xcargs << %Q[ALGOLIA_APPLICATION_ID="#{api_id}"]
Expand All @@ -193,7 +197,7 @@ def prepare_api_keys()
if places_api_id
xcargs << %Q[PLACES_APPLICATION_ID="#{places_api_id}"]
end

places_api_key = ENV["PLACES_API_KEY"]
if places_api_key
xcargs << %Q[PLACES_API_KEY="#{places_api_key}"]
Expand Down

0 comments on commit 4ea018c

Please sign in to comment.