Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément Blaise committed Jan 11, 2021
1 parent 0d0ca99 commit 742bc2a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.PHONY: clean

REPO= github.com/ca-gip/dploy
NAME= dploy

dependency:
go mod download

test: dependency
GOARCH=amd64 go test ./internal/services

linux: test
GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -v -o ./build/linux_amd64 -i $(GOPATH)/src/$(REPO)/main.go

darwin: test
GOOS=darwin CGO_ENABLED=0 GOARCH=amd64 go build -a -ldflags '-extldflags "-static"' -v -o ./build/darwin_amd64 -i $(GOPATH)/src/$(REPO)/main.go

build: linux darwin

0 comments on commit 742bc2a

Please sign in to comment.