.phony: all build build-debug run clean test docs docs-all publish

all: build

build:
	cargo build --release

build-debug:
	cargo build

run:
	cargo run

clean:
	cargo clean
	rm -rf ./target
	rm -rf ./logfile_*

test: clean
	echo "this is only a Testfile!" > ./testfile.txt
	cargo test
	rm -rf ./testfile.txt
	rm -rf ./logfile_*

docs:
	cargo doc --no-deps

docs-all:
	cargo doc

publish: clean  docs
	cargo package
	cargo publish
