.PHONY: all deps fetch generate clean compile format test docs shell publish

all: deps compile check test docs

deps:
	mix deps.get
	mix deps.compile

fetch: deps
	mix uof.xsd.fetch

generate: fetch
	mix uof.gen.schemas

clean:
	rm -rf priv/xsd lib/uof/api/schemas

compile:
	mix compile --warnings-as-errors

format:
	mix format

check:
	mix format --check-formatted

test:
	mix test --warnings-as-errors

docs:
	mix docs

shell: compile
	iex -S mix

publish: deps
	mix local.hex --force
	mix hex.publish --yes
