-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (19 loc) · 758 Bytes
/
Makefile
File metadata and controls
25 lines (19 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
DOCKER_IMAGE := gitdump:latest
GO_BINARY_NAME := gitdump
RELEASE_DIR := bin
OSX_BINARY_DIR := $(RELEASE_DIR)/osx
LINUX_BINARY_DIR := $(RELEASE_DIR)/linux
WINDOWS_BINARY_DIR := $(RELEASE_DIR)/windows
.PHONY: build dev binary releases clean
build:
docker build -t $(DOCKER_IMAGE) .
dev: build
docker run -it --rm -v $(CURDIR):/usr/src/app/go/src/github.com/mrauer/gitdump $(DOCKER_IMAGE)
binary:
env GOOS=linux GOARCH=amd64 go build -o $(GO_BINARY_NAME)
releases: clean binary
env GOOS=darwin GOARCH=amd64 go build -o $(OSX_BINARY_DIR)/$(GO_BINARY_NAME)
env GOOS=linux GOARCH=amd64 go build -o $(LINUX_BINARY_DIR)/$(GO_BINARY_NAME)
env GOOS=windows GOARCH=amd64 go build -o $(WINDOWS_BINARY_DIR)/$(GO_BINARY_NAME).exe
clean:
rm -rf $(RELEASE_DIR)