JENKINS-19595: Support multiple targets to be passed into xcodebuild #43

Merged
merged 10 commits into from Jan 7, 2015

Conversation

Projects
None yet
4 participants

Added a check box to indicate the target field should be interpreted as a regular expression. The output of the xcodebuild -list command is redirected to a byte array so it can be parsed as well as logged. When checked the parsed list of targets are compared against the regex and a -target parameter is added when a match is found.

plugins » xcode-plugin #52 SUCCESS
This pull request looks good

Owner

jenkinsadmin commented May 9, 2014

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

I wonder if this pull request should be rejected in favor of one with the checkbox in the advanced section. That way the checkbox could be applied to either the Target or Scheme textfield, whichever is set.

plugins » xcode-plugin #67 SUCCESS
This pull request looks good

It might be useful to say we will add all matching targets.

WOuld something like that be more readable ?

List matchedTargets = Collections2.filter(xcodebuildListParser.getTargets(),
            Predicates.containsPattern(target));

 if (matchedTargets.isEmpty()) {
   listener.getLogger().println(Messages.XCodeBuilder_NoMatchingTargetsFound());
   return false;
 }

 for (String matchedTarget : matchedTargets) {
     commandLine.add("-target");
     commandLine.add(matchedTarget);
     xcodeReport.append("target: ").append(matchedTarget);
 }

any chance you could add a test case for this with real output from a command ?

That way if this breaks somehow, we will be able to able to add the new test case easily

typo: targets

Note: we should say here we will add all targets listed under xcodebuild -list, all that match the regexp.

plugins » xcode-plugin #69 SUCCESS
This pull request looks good

timothy-volvo added some commits Dec 17, 2014

@timothy-volvo timothy-volvo Merge branch 'master' of https://github.com/jenkinsci/xcode-plugin
5805b52
@timothy-volvo timothy-volvo Merge branch 'master' of https://github.com/jenkinsci/xcode-plugin
31a5186
@timothy-volvo timothy-volvo updated version number
4117e44

@lacostej lacostej merged commit 4117e44 into jenkinsci:master Jan 7, 2015

1 of 2 checks passed

default Jenkins is validating pull request ...
Details
Jenkins This pull request looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment