flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - Moved the directory creation to the place it belongs (removed the "isMarmotinniRun" check when creating the directories though ... so if anything goes wrong, we know where to check)
Date Wed, 23 Nov 2016 09:49:58 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop a4b560562 -> e28b138d4


Moved the directory creation to the place it belongs (removed the "isMarmotinniRun" check
when creating the directories though ... so if anything goes wrong, we know where to check)


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/e28b138d
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/e28b138d
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/e28b138d

Branch: refs/heads/develop
Commit: e28b138d43854b1ba6abe3be9234c6305a9bc219
Parents: a4b5605
Author: Christofer Dutz <christofer.dutz@codecentric.de>
Authored: Wed Nov 23 10:49:45 2016 +0100
Committer: Christofer Dutz <christofer.dutz@codecentric.de>
Committed: Wed Nov 23 10:49:45 2016 +0100

----------------------------------------------------------------------
 .../mxml/flexjs/MXMLFlexJSPublisher.java        | 41 ++++++++------------
 1 file changed, 16 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e28b138d/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index c50bef8..7725b80 100644
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -153,31 +153,6 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements IJSPublisher
         // The "release" is the "js-release" directory.
         File releaseDir = new File(outputParentFolder, FLEXJS_RELEASE_DIR_NAME);
 
-
-        /////////////////////////////////////////////////////////////////////////////////
-        // Prepare the output directories
-        /////////////////////////////////////////////////////////////////////////////////
-
-        // The intermediate dir has been created by the previous parts of the compiler
-        // in case of a release build, we have to ensure the release dir is clean and
-        // empty.
-        // FIXME: I don't like this marmotinni stuff ... we should refactor this....
-        if (!isMarmotinniRun)
-        {
-            // If there is a release dir, we delete it in any case.
-            /*if (releaseDir.exists()) {
-                FileUtils.deleteQuietly(releaseDir);
-            }*/
-
-            // Only create a release directory for release builds.
-	        if (configuration.release()) {
-	            if (!releaseDir.exists() && !releaseDir.mkdirs()) {
-	                throw new IOException("Unable to create release directory at " + releaseDir.getAbsolutePath());
-	            }
-	        }
-        }
-
-
         /////////////////////////////////////////////////////////////////////////////////
         // Copy static resources to the intermediate (and release) directory.
         /////////////////////////////////////////////////////////////////////////////////
@@ -647,6 +622,22 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher implements IJSPublisher
         return null;
     }
 
+    /**
+     * In case of release builds, we also need the 'js-release' directory created.
+     */
+    @Override
+    protected void setupOutputFolder() {
+        super.setupOutputFolder();
+
+        // Only create a release directory for release builds.
+        if (configuration.release()) {
+            File releaseDir = new File(outputParentFolder, FLEXJS_RELEASE_DIR_NAME);
+            if (!releaseDir.exists() && !releaseDir.mkdirs()) {
+                throw new RuntimeException("Unable to create release directory at " + releaseDir.getAbsolutePath());
+            }
+        }
+    }
+
     protected void clearEmptyDirectoryTrees(File baseDirectory) {
         File[] files = baseDirectory.listFiles();
         if(files != null) {


Mime
View raw message