Skip to content

Commit

Permalink
Fix homebrew linkage issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AliSoftware committed Jun 18, 2020
1 parent b2278f1 commit c62c7ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ namespace :cli do
Utils.run(
%(xcodebuild -workspace "#{WORKSPACE}.xcworkspace" -scheme "#{SCHEME_NAME}" -configuration "#{RELEASE_CONFIGURATION}") +
%( -derivedDataPath "#{BUILD_DIR}" TEMPLATE_PATH="#{tpl_rel_path}") +
%( SWIFTGEN_OTHER_LDFLAGS="-sectcreate __TEXT __info_plist #{plist_file.shellescape}"),
%( SWIFTGEN_OTHER_LDFLAGS="-sectcreate __TEXT __info_plist #{plist_file.shellescape}") +
# Note: "-Wl,-headerpad_max_install_names" is needed to fix a bug when Homebrew tries to update the dylib ID of linked frameworks
# - See: https://github.com/Homebrew/homebrew-core/pull/32403
# - See also: https://github.com/Carthage/Carthage/commit/899d8a5da15979fd0fede39fe57b56c7ff532abe for similar fix in Carthage's Makefile
%( 'OTHER_LDFLAGS=$(inherited) -Wl,-headerpad_max_install_names' ),
task, xcrun: true, formatter: :xcpretty
)
end
Expand Down
8 changes: 8 additions & 0 deletions rakelib/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ namespace :release do
.gsub(/(:tag\s+=>\s+)".*"/, %(\\1"#{tag}"))
.gsub(/(:revision\s+=>\s+)".*"/, %(\\1"#{revision}"))
File.write(formula_file, new_formula)

Utils.print_info "Formula has been auto-updated. Do you need to also do manual updates to it before continuing [y/n]?"
if STDIN.gets.chomp.downcase == 'y'
sh "open", formula_file
puts "Once you've finished editing the formula file, press enter to continue."
STDIN.gets.chomp
end

Utils.print_header 'Checking Homebrew formula...'
Bundler.with_clean_env do
sh 'brew audit --strict --online swiftgen'
Expand Down

0 comments on commit c62c7ff

Please sign in to comment.