<commit_before>.PHONY: all release

VERSION := $(shell grep VERSION main.lua | sed -e 's/    VERSION=$"//' -e 's/$",//')

all: vohttp encapsulate

vohttp:
	make -C lib/vohttp/
	cp lib/vohttp/out/vohttp_packed.lua lib/

encapsulate:
	volucapsulate media/css
	volucapsulate media/js

release: vohttp
	rm -rf _release
	git checkout-index -f -a --prefix=_release/vocontrol/
	cp lib/vohttp_packed.lua _release/vocontrol/lib
	make -C _release/vocontrol/ encapsulate
	find _release/vocontrol/media/css -name '*.css' -delete
	find _release/vocontrol/media/js -name '*.js' -delete
	rm -r _release/vocontrol/lib/vohttp
	rm _release/vocontrol/.gitignore
	rm _release/vocontrol/.gitmodules
	mv _release/vocontrol _release/vocontrol-$(VERSION)
	cd _release && zip -r vocontrol-$(VERSION).zip vocontrol-$(VERSION)
	cd _release && tar czf vocontrol-$(VERSION).tar.gz vocontrol-$(VERSION)

release-upload:
	scp _release/vocontrol-$(VERSION).zip 0x0b.de:/var/www/vocontrol.0x0b.de/htdocs/releases
	scp _release/vocontrol-$(VERSION).tar.gz 0x0b.de:/var/www/vocontrol.0x0b.de/htdocs/releases

clean:
	find media/css -name '*.css.lua' -delete
	find media/css -name '*.js.lua' -delete
	make -C lib/vohttp/ clean
	rm lib/vohttp_packed.lua
	rm -rf _release<commit_msg>sign releases<commit_after>.PHONY: all release

VERSION := $(shell grep VERSION main.lua | sed -e 's/    VERSION=$"//' -e 's/$",//')

all: vohttp encapsulate

vohttp:
	make -C lib/vohttp/
	cp lib/vohttp/out/vohttp_packed.lua lib/

encapsulate:
	volucapsulate media/css
	volucapsulate media/js

release: vohttp
	rm -rf _release
	git checkout-index -f -a --prefix=_release/vocontrol/
	cp lib/vohttp_packed.lua _release/vocontrol/lib
	make -C _release/vocontrol/ encapsulate
	find _release/vocontrol/media/css -name '*.css' -delete
	find _release/vocontrol/media/js -name '*.js' -delete
	rm -r _release/vocontrol/lib/vohttp
	rm _release/vocontrol/.gitignore
	rm _release/vocontrol/.gitmodules
	mv _release/vocontrol _release/vocontrol-$(VERSION)
	cd _release && zip -r vocontrol-$(VERSION).zip vocontrol-$(VERSION)
	cd _release && gpg --armor --detach-sign vocontrol-$(VERSION).zip
	cd _release && tar czf vocontrol-$(VERSION).tar.gz vocontrol-$(VERSION)
	cd _release && gpg --armor --detach-sign vocontrol-$(VERSION).tar.gz

release-upload:
	cd _release && scp vocontrol-$(VERSION).zip vocontrol-$(VERSION).zip.asc 0x0b.de:/var/www/dl.0x0b.de/htdocs/vocontrol
	cd _release && scp vocontrol-$(VERSION).tar.gz vocontrol-$(VERSION).tar.gz.asc 0x0b.de:/var/www/dl.0x0b.de/htdocs/vocontrol

clean:
	find media/css -name '*.css.lua' -delete
	find media/css -name '*.js.lua' -delete
	make -C lib/vohttp/ clean
	rm lib/vohttp_packed.lua
	rm -rf _release
{'fraction_non_alphanumeric': 0.14434523809523808, 'fraction_numerical': 0.005952380952380952, 'mean_word_length': 3.943014705882353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '2900863', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1031, 'n_words': 228}