Packages

fnord

0.8.70

AI code archaeology

Current section

Files

Jump to
fnord Makefile
Raw

Makefile

.DEFAULT_GOAL := build
.PHONY: help
help: ## Display this help message
@echo "Usage: make [target]"
@echo
@echo "Targets:"
@awk '/^[a-zA-Z0-9_-]+:.*## / {printf "%s : %s\n", $$1, substr($$0, index($$0, "##") + 3)}' $(MAKEFILE_LIST) | sort | column -t -s ':'
@echo
.PHONY: build
build: ## Build the escript
mix escript.build
.PHONY: compile
compile: ## Compile the project
mix compile --all-warnings --warnings-as-errors
@echo
.PHONY: test
test: ## Run tests
mix test
@echo
.PHONY: cover
cover: ## Run tests with coverage
mix coveralls
@echo
.PHONY: dialyzer
dialyzer: ## Run Dialyzer
MIX_ENV=dev mix dialyzer
@echo
.PHONY: docs
docs: ## Generate documentation
mix docs
@echo
.PHONY: check
check: compile test dialyzer ## Run all checks
@echo "All checks passed"
.PHONY: format
format: ## Format the code
mix format
.PHONY: release
release: publish ## Alias for publish because apparently this is what my fingers' muscle memory prefers
.PHONY: publish
publish: check docs ## Publish the package
mix hex.publish
.PHONY: republish
republish: check docs ## Republish the package (within like 20m of publishing the last version)
mix hex.publish --replace
.PHONY: find-bak
find-bak: ## Find all backup files generated by fnord itself (**/*.*.bak)
find . -name "*.*.bak" -print
.PHONY: clean-bak
clean-bak: ## Clean up backup files generated by fnord itself (**/*.*.bak)
find . -name "*.*.bak" -print -exec rm -f {} \;
.PHONY: clean
clean: clean-bak ## Clean up ALL build artifacts, including dependencies and build directories
mix clean
rm -rf _build
rm -rf deps
rm -rf .elixir_ls
.PHONY: reset-scratch
reset-scratch: ## Reset scratch directory from archive if present
@if [ -d "scratch" ]; then \
echo "Removing existing scratch directory..."; \
rm -rf ./scratch; \
fi
@if [ -f "scratch.tar.gz" ]; then \
echo "Extracting scratch.tar.gz..."; \
tar -xzf scratch.tar.gz; \
echo "Scratch directory restored."; \
else \
echo "No scratch.tar.gz found to extract."; \
fi