Add Makefile (#25)

* Remove canonical import path

This either causes issues for the CI or people having the
repo checked out into the correct k8s.io/kube-state-metrics directory

.

* Add Makefile
This commit is contained in:
Fabian Reinartz 2016-09-20 12:12:20 +02:00 committed by GitHub
parent 1cce9e63cc
commit 031eb8da34
2 changed files with 27 additions and 1 deletions

26
Makefile Normal file
View File

@ -0,0 +1,26 @@
all: build
FLAGS =
ENVVAR = GOOS=linux GOARCH=amd64 CGO_ENABLED=0
REGISTRY = gcr.io/google_containers
TAG = v0.2.0
deps:
go get github.com/tools/godep
build: clean deps
$(ENVVAR) godep go build -o kube-state-metrics
test-unit: clean deps build
$(ENVVAR) godep go test --race . $(FLAGS)
container: build
docker build -t ${REGISTRY}/kube-state-metrics:$(TAG) .
push: container
gcloud docker push ${REGISTRY}/kube-state-metrics:$(TAG)
clean:
rm -f kube-state-metrics
.PHONY: all deps build test-unit container push clean

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package main // import "github.com/kubernetes/kube-state-metrics"
package main
import (
"fmt"