Skip to content
Permalink
Browse files

JENKINS-12144 : Always use an absolute path to not have problems when…

… 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 bf710312e215e5fa48b0fd344c5a602192b03deb
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/main/java/au/com/rayh/XCodeBuilder.java
@@ -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) {
@@ -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");
@@ -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;

0 comments on commit bf71031

Please sign in to comment.
You can’t perform that action at this time.