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_r137985164
 
 

 ##########
 File path: tools/cli/build.gradle
 ##########
 @@ -11,39 +11,33 @@ task removeBinary(type: Delete) {
     delete "${projectDir}/../../bin/windows"
 }
 
-task distBinary(dependsOn: [removeBinary, distDocker]) {
+task distBinary() {
     doLast {
+        // Copy all Go binaries from Docker into openwhisk/bin folder
         run(dockerBinary + ["rm", "-f", dockerContainerName], true)
         run(dockerBinary + ["run", "--name", dockerContainerName, 
dockerTaggedImageName])
-
-        // Copy all Go binaries from Docker into openwhisk/bin folder
-        run(dockerBinary + ["cp", dockerContainerName +
-                ":/src/github.com/go-whisk-cli/build/.", 
"${projectDir}/../../bin"])
-
+        run(dockerBinary + ["cp", dockerContainerName + 
":/src/github.com/go-whisk-cli/build/.", "${projectDir}/../../bin"])
         run(dockerBinary + ["rm", "-f", dockerContainerName])
     }
 }
 
-task dumpOSInfo {
+task copyCLIShortcut() {
     doLast {
-        println "os.name = "+getOsName()
-        println "os.arch = "+getOsArch()
-        println "go.name = "+mapOsNameToGoName(getOsName())
-        println "go.arch = "+mapOsArchToGoArch(getOsArch())
+        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"
+
+        exec {
+            executable "cp"
+            args "${from_path_wsk}", "${to_path_dir}"
+        }
 
 Review comment:
   I feel like folding this into `distBinary` could be valuable here vs. having 
the `finalizedBy` statement below, wdyt? Both are `doLast` blocks so it should 
just be copy&paste.
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to