瀏覽代碼

Merge pull request #6493 from gyuho/tester-build

	functional-tester: build from repo root, vendor
Gyu-Ho Lee 9 年之前
父節點
當前提交
4ec0fce109
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. 9 3
      tools/functional-tester/build

+ 9 - 3
tools/functional-tester/build

@@ -1,4 +1,10 @@
-#!/bin/sh -e
-CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s" -o bin/etcd-agent ./tools/functional-tester/etcd-agent
-CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s" -o bin/etcd-tester ./tools/functional-tester/etcd-tester
+#!/usr/bin/env bash
+
+if ! [[ "$0" =~ "tools/functional-tester/build" ]]; then
+	echo "must be run from repository root"
+	exit 255
+fi
+
+CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s" -o bin/etcd-agent ./cmd/tools/functional-tester/etcd-agent
+CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s" -o bin/etcd-tester ./cmd/tools/functional-tester/etcd-tester