Fix TO Golang build spec needing TO client

Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/57c1a13a
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/57c1a13a
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/57c1a13a

Branch: refs/heads/master
Commit: 57c1a13a59d6c08c4926d7fe256d3d804f4a3f21
Parents: 722915a
Author: Robert Butts <robert.o.bu...@gmail.com>
Authored: Thu Aug 3 10:33:50 2017 -0600
Committer: Dewayne Richardson <dewr...@apache.org>
Committed: Thu Aug 10 09:46:03 2017 -0600

----------------------------------------------------------------------
 traffic_ops/build/traffic_ops.spec | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/57c1a13a/traffic_ops/build/traffic_ops.spec
----------------------------------------------------------------------
diff --git a/traffic_ops/build/traffic_ops.spec 
b/traffic_ops/build/traffic_ops.spec
index 26d19e8..f723490 100644
--- a/traffic_ops/build/traffic_ops.spec
+++ b/traffic_ops/build/traffic_ops.spec
@@ -77,6 +77,15 @@ Built: %(date) by %{getenv: USER}
       go get -v \
     ) || { echo "Could not build go log at $(pwd): $!"; exit 1; }
 
+    # build TO client (dependencies within traffic_control will fail to `go 
get` unless prebuilt)
+    godir=src/github.com/apache/incubator-trafficcontrol/traffic_ops/client
+    ( mkdir -p "$godir" && \
+      cd "$godir" && \
+      cp -r "$TC_DIR"/traffic_ops/client/* . && \
+      echo "go getting log at $(pwd)" && \
+      go get -v \
+    ) || { echo "Could not build go Traffic Ops client at $(pwd): $!"; exit 1; 
}
+
     # build traffic_ops_golang binary
     
godir=src/github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang
     oldpwd=$(pwd)

Reply via email to