-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
59 lines (45 loc) · 1.57 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
58
59
.PHONY: help
help: ## Lists the available commands. Add a comment with '##' to describe a command.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: tests
tests: ## Execute all the tests
@cargo test $UNIT_TEST --verbose --lib
.PHONY: build
build: tests ## Execute all the tests and build funzzy binary
@cargo build --release
.PHONY: integration ## Exectute integration tests
integration:
@cargo test --test '*'
.PHONY: ci-integration
ci-integration:
@cargo test --test '*'
.PHONY: lint
lint:
@cargo fmt -- --check
.PHONY: linter
linter: lint
.PHONY: install
install: tests ## Install funzzy on your machine
GITSHA="$(shell git rev-parse --short HEAD)" cargo install --path .
.PHONY: integration-clean
integration-clean:
rm -rf /tmp/fzz || sudo rm -rf /tmp/fzz
.PHONY: nix-gen-patch
nix-gen-patch: ## Generate a patch for the nix derivation
@git diff origin/master -r -u > nix/gitdiff.patch
.PHONY: nix-flake-check
nix-flake-check: ## Check the nix flake
@nix flake check
.PHONY: nix-build-all
nix-build-all: nix-build nix-build-nightly ## Build the nix derivation with the nightly toolchain
echo "Done"
.PHONY: nix-build-nightly
nix-build-nightly: ## Build the nix derivation with the nightly toolchain
@nix build .#funzzyNightly --verbose -L
.PHONY: nix-build
nix-build: ## Build the nix derivation with the nightly toolchain
@nix build .#funzzy --verbose -L
.PHONY: nix-bump
nix-bump:
@sed -i 's/sha256-.*=https://g' nix/package.nix
@sed -i 's/sha256-.*=https://g' nix/package-from-source.nix