-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 704 Bytes
/
Makefile
File metadata and controls
37 lines (30 loc) · 704 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
BIN_DIR=bin
BIN=beget
PATH_TO_ENTER_POINT=github.com/ThCompiler/go.beget.api/cmd
.PHONY: local-build
local-build: bin-dir
go build -o $(BIN_DIR)/$(BIN) $(PATH_TO_ENTER_POINT)
.PHONY: build
build: bin-dir
if [ -z "$(shell git status --porcelain)" ]; then \
go build -o $(BIN_DIR)/$(BIN) $(PATH_TO_ENTER_POINT) ; \
else \
echo Working directory not clean, commit changes; \
fi
.PHONY: bin-dir
bin-dir:
mkdir -p $(BIN_DIR)
.PHONY: release
release:
git tag $(VERSION); \
git push origin $(VERSION)
.PHONY: clean
changelog:
sh ./workflow/changes.sh $(VERSION) > CURRENT-CHANGELOG.md
.PHONY: clean
clean:
echo "Cleaning..."; \
rm -Rf $(BIN_DIR)
.PHONY: fmt
fmt:
gofumpt -e -w -d -extra .