.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST)\
| sort\
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: tests
tests:
@cargo test --verbose
.PHONY: build
build: tests
@cargo build --release
.PHONY: prebuild
prebuild:
@cargo build
.PHONY: integration
integration:
@cargo test --features test-integration
.PHONY: integration-e2e
integration-e2e: integration-clean
@cargo test --features test-integration-e2e
.PHONY: ci-enable-hook
ci-enable-hook:
@ln -fs "${PWD}/scripts/git-hooks-checks" "${PWD}/.git/hooks/pre-push"
@chmod +x "${PWD}/.git/hooks/pre-push"
.PHONY: ci-integration
ci-integration: integration-clean
@cargo test --features test-integration
.PHONY: ci-run-on-push
ci-run-on-push:
@cat .github/workflows/on-push.yml \
| yq '.jobs | .[] | .steps | .[] | .run | select(. != null)' \
| xargs -I {} bash -c {}
.PHONY: fmt
fmt:
@cargo fmt
.PHONY: lint
lint:
@cargo fmt -- --check
.PHONY: linter
linter: lint
.PHONY: install
install: tests
GITSHA="$(shell git rev-parse --short HEAD)" cargo install --path .
.PHONY: integration-clean
integration-clean:
echo "Creating a temp dir for integration tests in /tmp/fzz"
rm -rf /tmp/fzz
mkdir -p /tmp/fzz
.PHONY: nix-gen-patch
nix-gen-patch:
@git diff origin/master -r -u > nix/gitdiff.patch
.PHONY: nix-flake-check
nix-flake-check:
@nix flake check
.PHONY: nix-build-all
nix-build-all: nix-build nix-build-nightly
echo "Done"
.PHONY: nix-build-local
nix-build-local:
@nix build .#local --verbose -L
.PHONY: nix-build-nightly
nix-build-nightly:
@nix build .# --verbose -L
.PHONY: nix-build
nix-build:
@nix build .# --verbose -L
.PHONY: nix-bump-default
nix-bump-default:
@echo "Bumping the version in nix default"
scripts/bump-nix-default
.PHONY: nix-bump-nightly
nix-bump-nightly:
@echo "Bumping the version in nix packages"
scripts/bump-nix-nightly
.PHONY: nix-bump-local
nix-bump-local:
@echo "Bumping the version in nix packages"
scripts/bump-nix-local
.PHONY: nix-bump-all
nix-bump-all: nix-bump-default nix-bump-nightly
@echo "Bumping all nix packages"