Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

swiftgen 0.5.0 #44968

Closed
wants to merge 1 commit into from
Closed

swiftgen 0.5.0 #44968

wants to merge 1 commit into from

Conversation

AliSoftware
Copy link
Contributor

Simple version bump with new features

Notes:

  • The rake install command as changed and now takes the directories where to install $bin and $lib (Frameworks)
  • The fixtures have been reorganized in the source repo, and as a consequence it's now easier to install them in pkgshare (hence the big diff in the formula there)

end

test do
output = shell_output("#{bin}/swiftgen-assets #{pkgshare}/Images.xcassets").strip
assert_equal output, (pkgshare/"assets.swift").read.strip, "swiftgen-assets failed"
shell_output("#{bin}/swiftgen --version")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use system "#{bin}/swiftgen", "--version" if you don’t use the output.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I don't use the output, but I want all the other checks that Homebrew makes with shell_output, especially ohai the command + ensuring the exitstatus is 0 (as per previous recommandation of Homebrew team here), all of which system doesn't do, right?

Or maybe there is another Homebrew wrapper function that does all the checks but to use when you don't need the output, idk?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

system works exactly like shell_output except that it doesn’t capture the output; so that’s exactly what you’re looking for here 😉

It’s a wrapper, not the bare-bone Ruby system: https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/formula.rb#L1309

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha! Didn't know it was a wrapper too, thx for the info 😉

Just fixed it!

@bfontaine
Copy link
Contributor

Thank you for your contribution @AliSoftware; we appreciate it! 🎉

@bfontaine bfontaine closed this in bbbc9f9 Oct 15, 2015
@AliSoftware
Copy link
Contributor Author

This installation seems to fail for some users because BrewBot brewed a bottle on your own servers — on which Xcode is installed in /Applications/Xcode.app and so is where my binary is searching for Swift dylibs when running — but on some users' machines (esp. on a CircleCI VM) Xcode.app is installed elsewhere and my binary can't find the Swift dylibs.

See SwiftGen/SwiftGen#35 (comment)

Any suggestion on how to solve this? Maybe add a post-script step where I add an @rpath to my binary (install_name_tool -add_rpath …) so it adds the path to the local installation of Xcode in the dylibs search path? Should I open a dedicated issue about this?

@MikeMcQuaid
Copy link
Member

@AliSoftware We probably need to add a def pour_bottle method which checks for the Xcode location before pouring the bottle. Could you try and open a pull request? This should help and I'm happy to walk you through anything else: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/How-To-Open-a-Homebrew-Pull-Request-(and-get-it-merged).md#how-to-open-a-homebrew-pull-request-and-get-it-merged

Thanks!

@MikeMcQuaid
Copy link
Member

@AliSoftware I see you already did! Thanks: #45008

@AliSoftware
Copy link
Contributor Author

Yep indeed, thx!

@AliSoftware AliSoftware deleted the swiftgen-0.5.0 branch October 25, 2015 18:23
@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants