forked from dagu-org/dagu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (34 loc) · 771 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
43
VERSION=$(shell date +'%y%m%d%H%M%S')
LDFLAGS=-X 'main.version=$(VERSION)'
.PHONY: build-dir
build-dir:
mkdir -p ./bin
.PHONY: build
build: build-admin build-dir
go build -ldflags="$(LDFLAGS)" -o ./bin/dagu ./cmd/
.PHONY: build-admin
build-admin:
cd admin; \
yarn && yarn build
cp admin/dist/bundle.js ./internal/admin/handlers/web/assets/js/
.PHONY: server
server: build-dir
go build -ldflags="$(LDFLAGS)" -o ./bin/dagu ./cmd/
./bin/dagu server
.PHONY: scheduler
scheduler: build-dir
go build -ldflags="$(LDFLAGS)" -o ./bin/dagu ./cmd/
./bin/dagu scheduler
.PHONY: test
test: build
go test ./...
.PHONY: test-clean
test-clean:
go clean -testcache
go test ./...
.PHONY: lint
lint:
golangci-lint run ./...
.PHONY: clean
clean:
rm -rf bin admin/dist