This repository has been archived by the owner. It is now read-only.

Issue #168 wrap xcodebuild calls within ruby system environment #176

Merged
merged 3 commits into from Jan 12, 2016

Conversation

Projects
None yet
3 participants
@lacostej
Contributor

lacostej commented Jan 7, 2016

This pull request aims to provide a safe wrapper.

The xcbuild-wrapper.sh originates from a gist linked from a stackoverflow, and was modified to make sure it works when:

  1. using rvm
  2. using rbenv
  3. using system ruby under the following conditions:
export GEM_HOME=/Users/lacostej/.gem/ruby/2.0.0
export PATH=/Users/lacostej/.gem/ruby/2.0.0/bin:$PATH
gem install bundler
bundle install
fastlane ...

I suspect this is good enough and I don't need to use sudo to test the same thing.

@wrapped_xcodebuild_path = File.join("/tmp", "xcbuild-safe.sh")
unless File.exist?(@wrapped_xcodebuild_path)

This comment has been minimized.

@KrauseFx

KrauseFx Jan 8, 2016

Contributor

Any reason why we don't just run it directly from there?

This comment has been minimized.

@KrauseFx

KrauseFx Jan 8, 2016

Contributor

Instead of copying

This comment has been minimized.

@lacostej

lacostej Jan 8, 2016

Contributor

I originally meant it like that because of:

  • cleaner command line
  • easy to access the script to modify it and adapt it while developing
  • similar to the way we install other wrapper scripts.

But I can see that this can cause problems with upgrades as is (it your newer version of gym contains an improved wrapper, it won't be copied over).

So I'll make it run in place instead. I'll fix it later today.

@KrauseFx

This comment has been minimized.

Contributor

KrauseFx commented Jan 8, 2016

Thanks for testing this. We'd need to test it on a System Ruby installation as well before we can merge it 👍

@lacostej lacostej force-pushed the lacostej:features/wrap_xcodebuild branch from 88a2b7c to 1160c19 Jan 8, 2016

@claybridges

This comment has been minimized.

claybridges commented Jan 8, 2016

My little gist done all growd up!

@KrauseFx

This comment has been minimized.

Contributor

KrauseFx commented Jan 9, 2016

Thanks @lacostej for preparing this. As this is taken from https://gist.github.com/claybridges/cea5d4afd24eda268164 via @claybridges we'd also need to be sure the license is okay.

@claybridges do you give permission to merge this in under the MIT license of fastlane?

@KrauseFx

This comment has been minimized.

Contributor

KrauseFx commented Jan 9, 2016

@lacostej There seems to be a merge conflict 😢

@lacostej lacostej force-pushed the lacostej:features/wrap_xcodebuild branch from 47c80c2 to 41dcf91 Jan 9, 2016

@lacostej

This comment has been minimized.

Contributor

lacostej commented Jan 9, 2016

Merge conflict was 9cda56e which had been fixed as de553c5 already. I just dropped it from the branch.

@lacostej

This comment has been minimized.

Contributor

lacostej commented Jan 9, 2016

WRT the gist license, @claybridges's gist went from 5 lines including shebang and enabling debugging to 14, so I hope it's not that of a blocker :)

While I am at it, there are probably other ways to implement this, like in pure ruby: https://github.com/pitluga/subcontractor/blob/master/lib/subcontractor/cli.rb#L9-L33

@claybridges

This comment has been minimized.

claybridges commented Jan 10, 2016

Hi guys. I release this tiny script into the public domain with no copyright attachments whatsoever. Happy it's seeing some use.

@lacostej

This comment has been minimized.

Contributor

lacostej commented Jan 11, 2016

Merci @claybridges !

KrauseFx added a commit that referenced this pull request Jan 12, 2016

Merge pull request #176 from lacostej/features/wrap_xcodebuild
Issue #168 wrap xcodebuild calls within ruby system environment

@KrauseFx KrauseFx merged commit e77dc79 into fastlane-old:master Jan 12, 2016

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
coverage/coveralls Coverage increased (+0.1%) to 68.168%
Details
hound No violations found. Woof!
@KrauseFx

This comment has been minimized.

Contributor

KrauseFx commented Jan 12, 2016

Perfect, thanks @claybridges and @lacostej 🚀

@lacostej lacostej deleted the lacostej:features/wrap_xcodebuild branch Jan 27, 2016

@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 11, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.