Skip to content

Commit

Permalink
Do not change or generate README.md after running rspec (#8629)
Browse files Browse the repository at this point in the history
* Do not change or generate README.md after running rspec

* Mock FastlaneCore::Env to skip generating docs

* Do not change existing code in lane_manager_spec

* Feedback addressed

* Fix rubocop error by extracting method
  • Loading branch information
nafu committed Apr 1, 2017
1 parent 947e806 commit 068aecb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fastlane/lib/fastlane/lane_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def self.cruise_lane(platform, lane, parameters = nil, env = nil)
end

# After running the lanes, since skip_docs might be somewhere in-between
Fastlane::DocsGenerator.run(ff) unless FastlaneCore::Env.truthy?("FASTLANE_SKIP_DOCS")
Fastlane::DocsGenerator.run(ff) unless skip_docs?

duration = ((Time.now - started) / 60.0).round

Expand All @@ -70,6 +70,10 @@ def self.cruise_lane(platform, lane, parameters = nil, env = nil)
return ff
end

def self.skip_docs?
Helper.test? || FastlaneCore::Env.truthy?("FASTLANE_SKIP_DOCS")
end

# All the finishing up that needs to be done
def self.finish_fastlane(ff, duration, error)
ff.runner.did_finish
Expand Down

0 comments on commit 068aecb

Please sign in to comment.