-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
42 lines (32 loc) · 996 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
33
34
35
36
37
38
39
40
41
42
GOPATH := $(shell go env GOPATH)
GOBIN := $(GOPATH)/bin
DOCKER = $(shell which docker)
# Update changelog vars
ifneq (,$(SINCE_TAG))
sinceTag := --since-tag $(SINCE_TAG)
endif
ifneq (,$(UPCOMING_TAG))
upcomingTag := --future-release $(UPCOMING_TAG)
endif
all: lint install
build:
@echo "building babylon-relayer binary..."
@go build -mod=readonly -o build/babylon-relayer main.go
clean:
@echo "removing build/"
@rm -rf ./build
install:
@echo "installing babylon-relayer binary..."
@go build -mod=readonly -o $(GOBIN)/babylon-relayer main.go
test:
@go test -mod=readonly -race ./...
lint:
@golangci-lint run
@find . -name '*.go' -type f -not -path "*.git*" | xargs gofmt -d -s
@go mod verify
build-relayer-docker:
@make -C contrib/images babylon-relayer
update-changelog:
@echo ./scripts/update_changelog.sh $(sinceTag) $(upcomingTag)
./scripts/update_changelog.sh $(sinceTag) $(upcomingTag)
.PHONY: all build clean install test lint build-relayer-docker update-changelog