dubeejw 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_r147245782
##########
File path: tools/cli/build.gradle
##########
@@ -11,22 +11,18 @@ task removeBinary(type: Delete) {
delete "${projectDir}/../../bin/windows"
}
-task distBinary() {
+task distBinary(dependsOn: [removeBinary]) {
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"
+
Review comment:
The git diff looks strange. exec is in distBinary though.
```
task distBinary(dependsOn: [removeBinary]) {
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"
// Copy all Go binaries from Docker into openwhisk/bin folder
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])
exec {
executable "cp"
args "${from_path_wsk}", "${to_path_dir}"
}
}
}
```
----------------------------------------------------------------
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