Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
makefile: Clean directories properly before each build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyah Check committed Sep 27, 2017
1 parent a8a026c commit 68ee451
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILDTAGS=

all: clean fmt vet build test install

build:
build: fmt vet
@echo "+ $@"
@go build -tags "$(BUILDTAGS) cgo" . ## Thinking of downloading the required go deps in here.
#@docker build -t ch3ck/ytd:v1 . Disable docker build.
Expand All @@ -20,11 +20,13 @@ static:

fmt:
@echo "+ $@"
@gofmt -s -l . | grep -v vendor | tee /dev/stderr
@gofmt -s -l -w . | grep -v vendor | tee /dev/stderr

test: fmt vet
test:
@echo "+ $@"
@find . -name \*.mp3 -delete #clean previous test files.
@go test -v -tags "$(BUILDTAGS) cgo" $(shell go list ./... | grep -v vendor)
@find . -name \*.mp3 -delete # clean previous test downloads
@go test -bench=. $(shell go list ./... | grep -v vendor)

vet:
Expand All @@ -34,6 +36,8 @@ vet:
clean:
@echo "+ $@"
@rm -rf ytd
@find . -name \*.mp3 -delete
@find . -name \*.flv -delete

install:
@echo "+ $@"
Expand Down

0 comments on commit 68ee451

Please sign in to comment.