github.com/projectriff/riff-cli@v0.0.5-0.20180301104501-5db7a3bd9fc1/Makefile (about)

     1  .PHONY: build clean test release
     2  OUTPUT = riff
     3  OUTPUT_WINDOWS = $(OUTPUT).exe
     4  GO_SOURCES = $(shell find cmd pkg -type f -name '*.go')
     5  
     6  build: $(OUTPUT)
     7  
     8  vendor: Gopkg.lock
     9  	dep ensure -vendor-only
    10  
    11  Gopkg.lock: Gopkg.toml
    12  	dep ensure -update
    13  
    14  test: build
    15  	go test -v ./...
    16  
    17  $(OUTPUT): $(GO_SOURCES) vendor
    18  	go build -o $(OUTPUT) cmd/riff/main.go
    19  
    20  release: $(GO_SOURCES) vendor
    21  	GOOS=darwin   GOARCH=amd64 go build -o $(OUTPUT) cmd/riff/main.go && tar -czf riff-darwin-amd64.tgz $(OUTPUT) && rm -f $(OUTPUT)
    22  	GOOS=linux    GOARCH=amd64 go build -o $(OUTPUT) cmd/riff/main.go && tar -czf riff-linux-amd64.tgz $(OUTPUT) && rm -f $(OUTPUT)
    23  	GOOS=windows  GOARCH=amd64 go build -o $(OUTPUT_WINDOWS) cmd/riff/main.go && zip -mq riff-windows-amd64.zip $(OUTPUT_WINDOWS)
    24  
    25  clean:
    26  	rm -f $(OUTPUT)
    27  	rm -f riff-darwin-amd64.tgz
    28  	rm -f riff-linux-amd64.tgz
    29  	rm -f riff-windows-amd64.zip