You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/10/31 16:48:07 UTC

[GitHub] csantanapr closed pull request #2479: Ensure Proper Order of CLI Build Tasks

csantanapr closed pull request #2479: Ensure Proper Order of CLI Build Tasks
URL: https://github.com/apache/incubator-openwhisk/pull/2479
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tools/cli/build.gradle b/tools/cli/build.gradle
index deda2a64ff..02b22d4ec7 100644
--- a/tools/cli/build.gradle
+++ b/tools/cli/build.gradle
@@ -11,39 +11,27 @@ task removeBinary(type: Delete) {
     delete "${projectDir}/../../bin/windows"
 }
 
-task distBinary(dependsOn: [removeBinary, distDocker]) {
+task distBinary(dependsOn: [removeBinary]) {
     doLast {
-        run(dockerBinary + ["rm", "-f", dockerContainerName], true)
-        run(dockerBinary + ["run", "--name", dockerContainerName, dockerTaggedImageName])
+        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"
 
         // 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 + ["rm", "-f", dockerContainerName], true)
+        run(dockerBinary + ["run", "--name", dockerContainerName, dockerTaggedImageName])
+        run(dockerBinary + ["cp", dockerContainerName + ":/src/github.com/go-whisk-cli/build/.", "${projectDir}/../../bin"])
         run(dockerBinary + ["rm", "-f", dockerContainerName])
-    }
-}
 
-task dumpOSInfo {
-    doLast {
-        println "os.name = "+getOsName()
-        println "os.arch = "+getOsArch()
-        println "go.name = "+mapOsNameToGoName(getOsName())
-        println "go.arch = "+mapOsArchToGoArch(getOsArch())
+        exec {
+            executable "cp"
+            args "${from_path_wsk}", "${to_path_dir}"
+        }
     }
 }
 
-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
-}
-
-pushImage.finalizedBy copyCLIShortcut
+pushImage.finalizedBy distBinary
 
 // Returns the Go CLI docker build args
 def getDockerBuildArgs() {


 

----------------------------------------------------------------
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