diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0ee0151 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +TEST?=$(glide novendor) +NAME = $(shell awk -F\" '/^const Name/ { print $$2 }' main.go) +VERSION = $(shell awk -F\" '/^const Version/ { print $$2 }' main.go) + +all: deps build + +deps: + glide install + +updatedeps: + glide update + +build: deps + @mkdir -p bin/ + go build -o bin/$(NAME) + +test: deps + go test $(TEST) $(TESTARGS) -timeout=30s -parallel=4 + +package: test build + tar -zcvf bin/distributive.tar.gz distributive + +.PHONY: all deps updatedeps build test package diff --git a/packaging/spec.yml b/packaging/spec.yml deleted file mode 100644 index c635c67..0000000 --- a/packaging/spec.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: distributive -version: 0.2.4 -iteration: 1 -license: ASL 2.0 -description: Distributive is a tool for running distributed health checks in datacenters. -url: https://github.com/CiscoCloud/distributive -type: rpm - -targets: - - src: "{{.BuildRoot}}/distributive" - dest: /usr/bin/distributive - - src: "{{empty}}" - dest: /etc/distributive.d/ - -scripts: - build: | - cd {{.SpecRoot}}/.. - godep go build -o {{.BuildRoot}}/distributive .