Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure correct line containing Xcode version is used when other outpu… #7171

Merged

Conversation

danielbowden
Copy link
Contributor

  • Run bundle exec rspec from the subdirectory of each tool you modified. Alternatively, run rake test_all from the root directory.
  • Run bundle exec rubocop -a to ensure the code style is valid
  • Read the Contribution Guidelines
  • We currently don't accept new actions, please publish a plugin instead, more information in Plugins.md

Currently the action ensure_xcode_version takes the first line of output to match the Xcode version.

This has been working fine for a while until today it fails:

[14:57:02]: ----------------------------------
[14:57:02]: --- Step: ensure_xcode_version ---
[14:57:02]: ----------------------------------
[14:57:02]: $ xcversion selected | head -1 | xargs echo -n
[14:57:05]: ▸ xargs: unterminated quote

[!] Exit status of command 'xcversion selected | head -1 | xargs echo -n' was 1 instead of 0.
xargs: unterminated quote

This is because the output of xcversion selected is currently:

Couldn't verify that spaceship is up to date
Xcode 8.0
Build version 8A218a

Ideally, spaceship would be up to date so this wouldn't occur but this caused failing builds on several projects.
This PR fixes this issue by instead taking the first line that starts with 'Xcode'

Copy link
Contributor

@mfurtak mfurtak left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! 🚀

@mfurtak mfurtak merged commit 92437b3 into fastlane:master Nov 28, 2016
mfurtak pushed a commit that referenced this pull request Nov 28, 2016
Suppliment the tests to cover the error case from #7171:
mfurtak added a commit that referenced this pull request Nov 28, 2016
Supplement the tests to cover the error case from #7171
@asfalcone asfalcone mentioned this pull request Nov 29, 2016
@fastlane fastlane locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants