github.com/tonnydourado/packer@v0.6.1-0.20140701134019-5d0cd9676a37/Makefile (about)

     1  NO_COLOR=\033[0m
     2  OK_COLOR=\033[32;01m
     3  ERROR_COLOR=\033[31;01m
     4  WARN_COLOR=\033[33;01m
     5  DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
     6  UNAME := $(shell uname -s)
     7  ifeq ($(UNAME),Darwin)
     8  ECHO=echo
     9  else
    10  ECHO=/bin/echo -e
    11  endif
    12  
    13  all: deps
    14  	@mkdir -p bin/
    15  	@$(ECHO) "$(OK_COLOR)==> Building$(NO_COLOR)"
    16  	@bash --norc -i ./scripts/devcompile.sh
    17  
    18  deps:
    19  	@$(ECHO) "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)"
    20  	@go get -d -v ./...
    21  	@echo $(DEPS) | xargs -n1 go get -d
    22  
    23  updatedeps:
    24  	@$(ECHO) "$(OK_COLOR)==> Updating all dependencies$(NO_COLOR)"
    25  	@go get -d -v -u ./...
    26  	@echo $(DEPS) | xargs -n1 go get -d -u
    27  
    28  clean:
    29  	@rm -rf bin/ local/ pkg/ src/ website/.sass-cache website/build
    30  
    31  format:
    32  	go fmt ./...
    33  
    34  test: deps
    35  	@$(ECHO) "$(OK_COLOR)==> Testing Packer...$(NO_COLOR)"
    36  	go test ./...
    37  
    38  .PHONY: all clean deps format test updatedeps