2013-06-30 08:13:01 -04:00
|
|
|
NO_COLOR=\033[0m
|
|
|
|
OK_COLOR=\033[32;01m
|
|
|
|
ERROR_COLOR=\033[31;01m
|
|
|
|
WARN_COLOR=\033[33;01m
|
2013-09-17 07:35:07 -04:00
|
|
|
DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
|
2014-04-21 12:30:51 -04:00
|
|
|
ECHO=/bin/echo -e
|
2013-05-07 14:39:32 -04:00
|
|
|
|
2013-08-13 21:42:08 -04:00
|
|
|
all: deps
|
2013-03-23 03:48:20 -04:00
|
|
|
@mkdir -p bin/
|
2014-04-21 12:30:51 -04:00
|
|
|
@$(ECHO) "$(OK_COLOR)==> Building$(NO_COLOR)"
|
2013-11-18 13:29:05 -05:00
|
|
|
@bash --norc -i ./scripts/devcompile.sh
|
2013-03-23 03:48:20 -04:00
|
|
|
|
2013-08-13 21:42:08 -04:00
|
|
|
deps:
|
2014-04-21 12:30:51 -04:00
|
|
|
@$(ECHO) "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)"
|
2013-08-13 21:42:08 -04:00
|
|
|
@go get -d -v ./...
|
2013-09-17 07:35:07 -04:00
|
|
|
@echo $(DEPS) | xargs -n1 go get -d
|
|
|
|
|
|
|
|
updatedeps:
|
2014-04-21 12:30:51 -04:00
|
|
|
@$(ECHO) "$(OK_COLOR)==> Updating all dependencies$(NO_COLOR)"
|
2013-09-22 12:55:01 -04:00
|
|
|
@go get -d -v -u ./...
|
2013-09-17 07:35:07 -04:00
|
|
|
@echo $(DEPS) | xargs -n1 go get -d -u
|
2013-08-13 21:42:08 -04:00
|
|
|
|
2013-07-18 10:26:36 -04:00
|
|
|
clean:
|
|
|
|
@rm -rf bin/ local/ pkg/ src/ website/.sass-cache website/build
|
|
|
|
|
2013-03-24 17:47:59 -04:00
|
|
|
format:
|
|
|
|
go fmt ./...
|
|
|
|
|
2013-08-13 21:42:08 -04:00
|
|
|
test: deps
|
2014-04-21 12:30:51 -04:00
|
|
|
@$(ECHO) "$(OK_COLOR)==> Testing Packer...$(NO_COLOR)"
|
2013-04-20 20:17:44 -04:00
|
|
|
go test ./...
|
2013-03-24 17:31:18 -04:00
|
|
|
|
2013-09-22 12:54:21 -04:00
|
|
|
.PHONY: all clean deps format test updatedeps
|