<commit_before>PKGS := $(shell vgo list ./... | grep -v vendor)

all: build

webui:
	sass --version
	#sass server/ui/css/flemzer.scss server/ui/css/flemzer.css

pull:
	git pull

install/vidocq:
	mkdir tmp
	git clone https://github.com/macarrie/vidocq tmp/vidocq
	cd tmp/vidocq && cargo build --release
	cp tmp/vidocq/target/release/vidocq install/vidocq

flemzerd: 
	vgo build -v

build: install/vidocq webui flemzerd

doc: webui
	cp server/ui/css/flemzer.css docs_src/themes/flemzer/static/css/flemzer.css

install: pull build
	cd install && sudo ./install.sh && cd ..

update: pull build
	cd install && sudo ./update.sh && cd ..

test:
	-rm -rf cover
	@echo "" > coverage.txt
	@tests_failed=0
	@mkdir -p cover
	@echo "mode: count" > cover/coverage.cov
	@for d in $(PKGS); \
	do \
		vgo test -covermode=count -coverprofile "cover/$${d##*/}.cov" "$$d"; \
		ret=$$?; \
		if [ $$ret -ne 0 ]; \
		then \
			tests_failed=$$ret; \
		fi; \
	done;
	@tail -q -n +2 cover/*.cov >> cover/coverage.cov
	#@vgo tool cover -func=cover/coverage.cov
	@exit $$tests_failed;


clean:
	-rm flemzerd
	-rm coverage.txt
	-rm server/ui/css/*.css server/ui/css/*.map
	-rm -rf .sass-cache
	-rm -rf tmp
	-rm -rf install/vidocq

.PHONY: all webui pull deps build doc test install update clean
<commit_msg>Updated Makefile to rebuild everytime (build was not redone whe using make update)<commit_after>PKGS := $(shell vgo list ./... | grep -v vendor)

all: build

webui:
	@sass --version
	#sass server/ui/css/flemzer.scss server/ui/css/flemzer.css

pull:
	git pull

install/vidocq:
	-rm -rf tmp
	mkdir -p tmp
	git clone https://github.com/macarrie/vidocq tmp/vidocq
	cd tmp/vidocq && cargo build --release
	cp tmp/vidocq/target/release/vidocq install/vidocq

build: install/vidocq webui flemzerd
	vgo build -v

doc: webui
	cp server/ui/css/flemzer.css docs_src/themes/flemzer/static/css/flemzer.css

install: pull build
	cd install && sudo ./install.sh && cd ..

update: pull build
	cd install && sudo ./update.sh && cd ..

test:
	-rm -rf cover
	@echo "" > coverage.txt
	@tests_failed=0
	@mkdir -p cover
	@echo "mode: count" > cover/coverage.cov
	@for d in $(PKGS); \
	do \
		vgo test -covermode=count -coverprofile "cover/$${d##*/}.cov" "$$d"; \
		ret=$$?; \
		if [ $$ret -ne 0 ]; \
		then \
			tests_failed=$$ret; \
		fi; \
	done;
	@tail -q -n +2 cover/*.cov >> cover/coverage.cov
	#@vgo tool cover -func=cover/coverage.cov
	@exit $$tests_failed;


clean:
	-rm flemzerd
	-rm coverage.txt
	-rm server/ui/css/*.css server/ui/css/*.map
	-rm -rf .sass-cache
	-rm -rf tmp
	-rm -rf install/vidocq

.PHONY: all webui pull deps build doc test install update clean

{'fraction_non_alphanumeric': 0.1532319391634981, 'fraction_numerical': 0.0022813688212927757, 'mean_word_length': 3.010670731707317, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '543125', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1063, 'n_words': 287}