-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (24 loc) · 887 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
.PHONY: test # Run the full test suite.
test:
@cargo test
.git/hooks/pre-commit:
@printf "#!/bin/sh\nmake lint\n" > $@
@chmod +x $@
.PHONY: lint # Lint the project
lint: .pre-commit-config.yaml
@pre-commit run --show-diff-on-failure --color=always --all-files
.PHONY: cover # Run cover tests and generate & open a report.
cover:
@./.ci/test-cover
.PHONY: docs # Generate and open cargo docs.
docs: target/doc/pgxn_meta/index.html
open $<
target/doc/pgxn_meta/index.html: $(shell find . -name \*.rs)
cargo doc
VERSION = $(shell perl -nE '/^version\s*=\s*"([^"]+)/ && do { say $$1; exit }' Cargo.toml)
.PHONY: release-notes # Show release notes for current version (must have `mknotes` in PATH).
release-notes: CHANGELOG.md
mknotes -v v$(VERSION) -f $< -r https://github.com/$(or $(GITHUB_REPOSITORY),pgxn/meta)
.PHONY: clean # Remove generated files
clean:
@rm -rf target