# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- <html>XCodeBuilder.java (<b>Feb 27, 2015 11:50:18 PM</b>)</html>
+++ <html><b>Current File</b></html>
@@ -621,29 +621,7 @@
return false;
}
- - FilePath ipaOutputPath = null;
- if (ipaOutputDirectory != null && ! StringUtils.isEmpty(ipaOutputDirectory)) {
- ipaOutputPath = buildDirectory.child(ipaOutputDirectory);
- - if (! ipaOutputPath.exists()) {
- ipaOutputPath.mkdirs();
- }
- }
-
- if (ipaOutputPath == null) {
- ipaOutputPath = buildDirectory;
- }
-
- listener.getLogger().println(Messages.XCodeBuilder_cleaningIPA());
- for (FilePath path : ipaOutputPath.list("*.ipa")) {
- path.delete();
- }
- listener.getLogger().println(Messages.XCodeBuilder_cleaningDSYM());
- for (FilePath path : ipaOutputPath.list("*-dSYM.zip")) {
- path.delete();
- }
listener.getLogger().println(Messages.XCodeBuilder_packagingIPA());
List<FilePath> apps = buildDirectory.list(new AppFileFilter());
@@ -680,8 +658,52 @@
return false;
}
+ +
+ + FilePath ipaOutputPath = null;
+ if (ipaOutputDirectory != null && ! StringUtils.isEmpty(ipaOutputDirectory)) {
String lastModified = new SimpleDateFormat("yyyy.MM.dd").format(new Date(app.lastModified()));
+ +
+ EnvVars customVars = new EnvVars(
+ "BASE_NAME", app.getBaseName().replaceAll(" ", "_"),
+ "VERSION", version,
+ "SHORT_VERSION", shortVersion,
+ "BUILD_DATE", lastModified
+ );
+ ipaOutputDirectory = customVars.expand(ipaOutputDirectory);
+
+
+ ipaOutputPath = buildDirectory.child(ipaOutputDirectory);
+
+ + if (! ipaOutputPath.exists()) {
+ ipaOutputPath.mkdirs();
+ }
+ }
+
+ if (ipaOutputPath == null) {
+ ipaOutputPath = buildDirectory;
+ }
+
+ listener.getLogger().println(Messages.XCodeBuilder_cleaningIPA());
+ for (FilePath path : ipaOutputPath.list("*.ipa")) {
+ path.delete();
+ }
+ listener.getLogger().println(Messages.XCodeBuilder_cleaningDSYM());
+ for (FilePath path : ipaOutputPath.list("*-dSYM.zip")) {
+ path.delete();
+ }
+
+ +
+
+
+
+ String lastModified = new SimpleDateFormat("yyyy.MM.dd").format(new Date(app.lastModified()));
+
String baseName = app.getBaseName().replaceAll(" ", "_") + (shortVersion.isEmpty() ? "" : "-" + shortVersion) + (version.isEmpty() ? "" : "-" + version);
if (! StringUtils.isEmpty(ipaName)) {
If I read the code correctly, right now the code does the following
1. prepare the ipaOutputPath
2. remove existing ipas and dsyms in the global ipaOutputPath
3. for each app
a. build the ipa into the ipaOutputPath
Your proposal requires us to make the change of making the ipaOutputPath to be app specific. Cleaning in the loop will not work in the same way.
I don't use projects that contain multiple apps. I would be happy to know more about those use cases to make sure they don't conflict with this change.