-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (43 loc) · 1.22 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
lint:
@echo "Running pre-commit hooks"
@poetry run pre-commit run --all-files
pre-commit:
@echo "Linting last commit"
@poetry run pre-commit run --from-ref HEAD~1 --to-ref HEAD
dependencies:
@echo "Installing dependencies"
@poetry update
install:
@echo "Installing the project"
@poetry install
.PHONY: test
test:
@echo "Running Pythontests"
@poetry run pytest -x -n auto
build-docker:
@echo "Building docker image"
@docker build -t chromadb-dp .
.PHONY: go-test
go-test:
@echo "Running tests"
@go test --count=1 -v --tags "fts5" ./...
.PHONY: go-install
go-install:
@go install -tags "fts5" -ldflags "-X 'main.Version=1.0.1-$$(git log -1 --format=%h)' -X 'main.BuildDate=$$(date +%Y-%m-%d)'"
.PHONY: go-lint
go-lint:
@golangci-lint run
.PHONY: lint-fix
go-lint-fix:
@golangci-lint run --fix ./...
.PHONY: go-build
go-build:
@go build -tags "fts5" -ldflags "-X 'main.Version=1.0.1' -X 'main.BuildHash=$$(git log -1 --format=%h)' -X 'main.BuildDate=$$(date +%Y-%m-%d)'" -o chops
.PHONY: go-binary-tarball
go-binary-tarball: go-build
@tar -czf chops-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz chops
.PHONY: sqlc
sqlc:
@echo "Generating SQLC code"
@go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
@sqlc generate