This is an automated email from the ASF dual-hosted git repository.

msciabarra pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 4376fee  Will our heroes be able to build a static go executable with 
travis? (#84)
4376fee is described below

commit 4376fee901651749cb44367cd4ba47dd9a36cc13
Author: Michele Sciabarra <30654959+sciabarra...@users.noreply.github.com>
AuthorDate: Wed Apr 10 15:11:03 2019 +0200

    Will our heroes be able to build a static go executable with travis? (#84)
    
    * reverting again
    
    * desperate means call for desperate measures
    
    * fixed the whitespaces
---
 actionloop/build.gradle | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/actionloop/build.gradle b/actionloop/build.gradle
index 4daba91..00b18da 100644
--- a/actionloop/build.gradle
+++ b/actionloop/build.gradle
@@ -18,12 +18,15 @@
 ext.dockerImageName = 'actionloop-v2'
 apply from: '../gradle/docker.gradle'
 
-distDocker.dependsOn 'copyProxy'
+distDocker.dependsOn 'staticBuildProxy'
 distDocker.finalizedBy('cleanup')
 
-task copyProxy(type: Copy) {
-    from '../common/proxy'
-    into '.'
+task staticBuildProxy(type: Exec) {
+       environment CGO_ENABLED: "0"
+       commandLine 'go', 'build',
+               '-o',  'proxy', '-a',
+               '-ldflags', '-extldflags "-static"',
+               '../main/proxy.go'
 }
 
 task cleanup(type: Delete) {

Reply via email to