You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
running fastlane run number_of_commits locally returns expected amount of commits from HEAD, while running number_of_commits(all: true) from a GitHub workflow always returns 1
Command executed
number_of_commits(all: true)
Complete output when running fastlane, including the stack trace and command used
fastlane run number_of_commits:
feelhip@Dev-Filippos-MacBook-Pro as-charging-app % fastlane run number_of_commits
[✔] 🚀
[10:42:01]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[10:42:02]: -------------------------------
[10:42:02]: --- Step: number_of_commits ---
[10:42:02]: -------------------------------
[10:42:02]: $ git rev-parse HEAD
[10:42:02]: ▸ f7f63c1cabeb569e7a3bc686f216eac52d4feb00
[10:42:02]: $ git rev-list HEAD --count
[10:42:02]: ▸ 109
[10:42:02]: Result: 109
desc "Deploy to Updraft"
lane :deploy_updraft do |options|
min_build_number = 210006000 # For legacy reason
build_number = min_build_number + number_of_commits(all: true)
Dir.chdir("../..") do
flavor = ENV["FLAVOR"]
sh "flutter build apk --release --build-number=#{build_number} --flavor %s" % flavor
end
updraft
end
this is normal, because there is only one commit on github PRs. This is because the "branch" that is actually being used is the merge between the base branch and the PR branch, not just the PR branch.
if you want to have the real number of commits, you must checkout you base branch (main usually) and your PR branch.
New Issue Checklist
Issue Description
running
fastlane run number_of_commits
locally returns expected amount of commits from HEAD, while runningnumber_of_commits(all: true)
from a GitHub workflow always returns 1Command executed
number_of_commits(all: true)
Complete output when running fastlane, including the stack trace and command used
fastlane run number_of_commits
:number_of_commits(all: true)
:Environment
🚫 fastlane environment 🚫
Stack
System Locale
fastlane files:
No Fastfile found
No Appfile found
fastlane gems
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
generated on: 2024-04-03
The text was updated successfully, but these errors were encountered: