Skip to content

Commit

Permalink
Feat(build): make copy depend on build
Browse files Browse the repository at this point in the history
  • Loading branch information
beeceej committed Jun 16, 2020
1 parent ad53d84 commit f78c05b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ VERSION := $$(git describe --tags)
COMMIT := $$(git rev-list -1 HEAD)
DST ?= ~/.bin/

default:
terraform-lsp:
go build -ldflags "-X main.GitCommit=$(COMMIT) -X main.Version=$(VERSION) -X main.Date=$(DATE)"

copy:
go build -ldflags "-X main.GitCommit=$(COMMIT) -X main.Version=$(VERSION) -X main.Date=$(DATE)" && cp ./terraform-lsp $(DST) && cp ./terraform-lsp ~/
copy: terraform-lsp
cp ./terraform-lsp $(DST) && cp ./terraform-lsp ~/

.PHONY: copy
clean:
rm -f terraform-lsp

default: terraform-lsp

.PHONY: clean copy

0 comments on commit f78c05b

Please sign in to comment.