2013-05-07 11:39:32 -07:00
|
|
|
NO_COLOR=\x1b[0m
|
|
|
|
OK_COLOR=\x1b[32;01m
|
|
|
|
ERROR_COLOR=\x1b[31;01m
|
|
|
|
WARN_COLOR=\x1b[33;01m
|
|
|
|
|
2013-05-07 11:50:42 -07:00
|
|
|
export ROOTDIR=$(CURDIR)
|
|
|
|
|
2013-03-23 00:48:20 -07:00
|
|
|
all:
|
|
|
|
@mkdir -p bin/
|
2013-03-25 14:17:21 -07:00
|
|
|
go get -d -v ./...
|
2013-05-07 11:39:32 -07:00
|
|
|
@echo "$(OK_COLOR)--> Compiling Packer...$(NO_COLOR)"
|
2013-03-25 14:17:21 -07:00
|
|
|
go build -v -o bin/packer
|
2013-05-08 22:34:20 -07:00
|
|
|
@echo "$(OK_COLOR)--> Compiling Builder: Amazon EBS...$(NO_COLOR)"
|
|
|
|
$(MAKE) -C plugin/builder-amazon-ebs
|
2013-05-07 11:39:32 -07:00
|
|
|
@echo "$(OK_COLOR)--> Compiling Command: Build...$(NO_COLOR)"
|
|
|
|
$(MAKE) -C plugin/command-build
|
2013-03-23 00:48:20 -07:00
|
|
|
|
2013-03-24 14:47:59 -07:00
|
|
|
format:
|
|
|
|
go fmt ./...
|
|
|
|
|
2013-03-24 14:31:18 -07:00
|
|
|
test:
|
2013-05-07 11:39:32 -07:00
|
|
|
@echo "$(OK_COLOR)--> Testing Packer...$(NO_COLOR)"
|
2013-03-25 14:17:21 -07:00
|
|
|
@go list -f '{{range .TestImports}}{{.}}\
|
|
|
|
{{end}}' ./... | xargs -n1 go get -d
|
2013-04-20 18:17:44 -06:00
|
|
|
go test ./...
|
2013-03-24 14:31:18 -07:00
|
|
|
|
2013-03-25 14:17:21 -07:00
|
|
|
.PHONY: all format test
|