You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/08/02 16:17:54 UTC

[GitHub] markusthoemmes commented on a change in pull request #2479: Ensure Proper Order of CLI Build Tasks

markusthoemmes commented on a change in pull request #2479: Ensure Proper Order of CLI Build Tasks
URL: https://github.com/apache/incubator-openwhisk/pull/2479#discussion_r130924099
 
 

 ##########
 File path: tools/cli/build.gradle
 ##########
 @@ -33,17 +30,26 @@ task dumpOSInfo {
     }
 }
 
-task copyCLIShortcut(type: Copy, dependsOn: [distBinary, dumpOSInfo]) {
-    String go_osname     = mapOsNameToGoName(getOsName())
-    String go_osarch     = mapOsArchToGoArch(getOsArch())
-    String from_path_wsk = "${projectDir}/../../bin/${go_osname}/${go_osarch}/wsk"
-    String to_path_dir   = "${projectDir}/../../bin"
-
-    from from_path_wsk
-    into to_path_dir
+task copyCLIShortcut() {
+    doLast {
+        String go_osname = mapOsNameToGoName(getOsName())
+        String go_osarch = mapOsArchToGoArch(getOsArch())
+        String from_path_wsk = "${projectDir}/../../bin/${go_osname}/${go_osarch}/wsk"
+        String to_path_dir = "${projectDir}/../../bin"
+
+        if (file(from_path_wsk).exists()) {
+            exec {
+                executable "cp"
+                args "${from_path_wsk}", "${to_path_dir}"
+            }
+        }
+    }
 
 Review comment:
   Why was this change needed?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services