Skip to content

Commit

Permalink
Simplify gutenberg_dependencies with early return
Browse files Browse the repository at this point in the history
Co-authored-by: Tony Li <[email protected]>
  • Loading branch information
mokagio and crazytonyli committed Jun 29, 2023
1 parent e3f8f94 commit 0f8cc00
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Gutenberg/cocoapods_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,12 @@ def gutenberg_pod(config: GUTENBERG_CONFIG)
end

def gutenberg_dependencies(options:)
if options[:path]
podspec_prefix = options[:path]
elsif options[:tag] || options[:commit]
return # when referencing via a tag or commit, we download pre-built frameworks
else
raise "Unexpected Gutenberg dependencies configuration '#{options}'"
end
# When referencing via a tag or commit, we download pre-built frameworks.
return if options.key?(:tag) || options.key?(:commit)

podspec_prefix = options[:path]

raise "Unexpected Gutenberg dependencies configuration '#{options}'" if podspec_prefix.nil?

podspec_prefix += '/third-party-podspecs'
podspec_extension = 'podspec.json'
Expand Down

0 comments on commit 0f8cc00

Please sign in to comment.