-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 839 Bytes
/
Makefile
File metadata and controls
41 lines (31 loc) · 839 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
# Name of the binary to be built
BINARY_NAME=snapshot-service
# Directories
CMD_DIR=./cmd
BIN_DIR=./bin
SRC_DIRS := $(shell find . -name '*.go' -not -path "./vendor/*")
# Build flags
BUILD_TAGS=
# Build the project
build:
$(GOBUILD) -tags "$(BUILD_TAGS)" -o $(BIN_DIR)/$(BINARY_NAME) $(CMD_DIR)/main.go
# Clean the project
clean:
$(GOCLEAN)
rm -rf $(BIN_DIR)
# Test the project
test:
$(GOTEST) -v ./...
# Test the project
docker-run:
docker rm -f nimiq-test || true && docker run -d --user root --name nimiq-test -v /mnt/c/Users/super/OneDrive/Bureaublad/projects/snapshot-service/test/:/root/.nimiq/ maestroi/nimiq-albatross:stable
# Install project dependencies
deps:
$(GOGET) -u
.PHONY: build clean test deps