forked from cosmo0920/fluent-bit-go-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 761 Bytes
/
Makefile
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
26
27
28
29
30
31
32
ifeq ($(OS),Windows_NT)
DLLEXT := .dll
TEST_OPTS := ./... -v
else
DLLEXT := .so
TEST_OPTS := -cover -race -coverprofile=coverage.txt -covermode=atomic
endif
VERSION := 0.6.0
# Version info for binaries
GIT_REVISION := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
VPREFIX := github.com/cosmo0920/fluent-bit-go-s3/vendor/github.com/prometheus/common/version
GO_FLAGS := -ldflags "-X $(VPREFIX).Branch=$(GIT_BRANCH) -X $(VPREFIX).Version=$(VERSION) -X $(VPREFIX).Revision=$(GIT_REVISION)" -tags netgo
all: test build
build:
go build $(GO_FLAGS) -buildmode=c-shared -o out_s3$(DLLEXT) .
fast:
go build out_s3.go s3.go
test:
go test $(TEST_OPTS)
dep:
dep ensure
clean:
rm -rf *$(DLLEXT) *.h