Skip to content

Commit

Permalink
JENKINS-12144 : Always use an absolute path to not have problems when…
Browse files Browse the repository at this point in the history
… we have a relative path for the FS Root of the remote agent
  • Loading branch information
aheritier committed Dec 19, 2011
1 parent 2c95751 commit bf71031
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/au/com/rayh/XCodeBuilder.java
Expand Up @@ -254,12 +254,12 @@ public boolean perform(AbstractBuild build, Launcher launcher, BuildListener lis

// Clean build directories
if (cleanBeforeBuild) {
listener.getLogger().println(Messages.XCodeBuilder_cleaningBuildDir(projectRoot.child("build")));
listener.getLogger().println(Messages.XCodeBuilder_cleaningBuildDir(projectRoot.child("build").absolutize().getRemote()));
buildDirectory.deleteRecursive();
}

// remove test-reports and *.ipa
listener.getLogger().println(Messages.XCodeBuilder_cleaningTestReportsDir(projectRoot.child("test-reports")));
listener.getLogger().println(Messages.XCodeBuilder_cleaningTestReportsDir(projectRoot.child("test-reports").absolutize().getRemote()));
projectRoot.child("test-reports").deleteRecursive();

if (unlockKeychain) {
Expand Down Expand Up @@ -378,7 +378,7 @@ else if (cfBundleVersion.isEmpty())
payload.deleteRecursive();
payload.mkdirs();

listener.getLogger().println("Packaging " + app.getBaseName() + ".app => " + ipaLocation);
listener.getLogger().println("Packaging " + app.getBaseName() + ".app => " + ipaLocation.absolutize().getRemote());
List<String> packageCommandLine = new ArrayList<String>();
packageCommandLine.add(getDescriptor().getXcrunPath());
packageCommandLine.add("-sdk");
Expand All @@ -388,20 +388,20 @@ else if (cfBundleVersion.isEmpty())
} else {
packageCommandLine.add(buildPlatform);
}
packageCommandLine.addAll(Lists.newArrayList("PackageApplication", "-v", app.getRemote(), "-o", ipaLocation.getRemote()));
packageCommandLine.addAll(Lists.newArrayList("PackageApplication", "-v", app.absolutize().getRemote(), "-o", ipaLocation.absolutize().getRemote()));
if (!StringUtils.isEmpty(embeddedProfileFile)) {
packageCommandLine.add("--embed");
packageCommandLine.add(embeddedProfileFile);
}

returnCode = launcher.launch().envs(envs).stdout(listener).pwd(projectRoot).cmds(packageCommandLine).join();
if (returnCode > 0) {
listener.getLogger().println("Failed to build " + ipaLocation.getName());
listener.getLogger().println("Failed to build " + ipaLocation.absolutize().getRemote());
continue;
}

// also zip up the symbols, if present
returnCode = launcher.launch().envs(envs).stdout(listener).pwd(buildDirectory).cmds("zip", "-r", "-T", "-y", baseName + "-dSYM.zip", app.getBaseName() + ".app.dSYM").join();
returnCode = launcher.launch().envs(envs).stdout(listener).pwd(buildDirectory).cmds("zip", "-r", "-T", "-y", baseName + "-dSYM.zip", app.absolutize().getRemote() + ".app.dSYM").join();
if (returnCode > 0) {
listener.getLogger().println(Messages.XCodeBuilder_zipFailed(baseName));
continue;
Expand Down

0 comments on commit bf71031

Please sign in to comment.