<commit_before>NAME=logspout

dev:
	docker build -f Dockerfile.dev -t $(NAME)-dev .
	docker run \
		-v /var/run/docker.sock:/tmp/docker.sock \
		-p 8000:8000 \
		$(NAME)-dev

build:
	docker build -t $(NAME) .
	@docker run $(NAME) --version > .version
	@echo "Version: $(shell cat .version)"
.version: build

release: .version
	rm -rf release && mkdir release
	go get github.com/progrium/gh-release/...
	docker rmi -f $(NAME):v$(shell cat .version) &> /dev/null || true
	docker tag $(NAME) $(NAME):v$(shell cat .version)
	docker save $(NAME):v$(shell cat .version) \
		| gzip -9 > release/$(NAME)_v$(shell cat .version).tgz
	gh-release create gliderlabs/$(NAME) $(shell cat .version) \
		$(shell git rev-parse --abbrev-ref HEAD) v$(shell cat .version)

.PHONY: release
<commit_msg>circleci executing shell function upfront?<commit_after>NAME=logspout

dev:
	docker build -f Dockerfile.dev -t $(NAME)-dev .
	docker run \
		-v /var/run/docker.sock:/tmp/docker.sock \
		-p 8000:8000 \
		$(NAME)-dev

build:
	docker build -t $(NAME) .
	@docker run $(NAME) --version > .version
	@echo Version: $(shell cat .version)
.version: build

release: .version
	rm -rf release && mkdir release
	go get github.com/progrium/gh-release/...
	docker rmi -f $(NAME):v$(shell cat .version) &> /dev/null || true
	docker tag $(NAME) $(NAME):v$(shell cat .version)
	docker save $(NAME):v$(shell cat .version) \
		| gzip -9 > release/$(NAME)_v$(shell cat .version).tgz
	gh-release create gliderlabs/$(NAME) $(shell cat .version) \
		$(shell git rev-parse --abbrev-ref HEAD) v$(shell cat .version)

.PHONY: release

{'fraction_non_alphanumeric': 0.17328292375551355, 'fraction_numerical': 0.011342155009451797, 'mean_word_length': 3.4481792717086837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7399116', 'n_tokens_mistral': 622, 'n_tokens_neox': 564, 'n_words': 168}