<commit_before>SOURCE = $(wildcard *.go)
TAG = $(shell git describe --tags)
GOBUILD = go build -ldflags '-w'

ALL = \
	$(foreach arch,32 64,\
	$(foreach suffix,win.exe osx linux,\
		build/gr-$(TAG)-$(arch)-$(suffix)))

all: $(ALL)

clean:
	rm -f $(ALL)

# cram is a python app, so 'easy_install/pip install cram' to run tests
test:
	cram tests/main.t

# os is determined as thus: if variable of suffix exists, it's taken, if not, then
# suffix itself is taken
win.exe = windows
osx = darwin
build/gr-$(TAG)-64-%: $(SOURCE)
	@mkdir -p $(@D)
	CGO_ENABLED=0 GOOS=$(firstword $($*) $*) GOARCH=amd64 $(GOBUILD) -o $@

build/gr-$(TAG)-32-%: $(SOURCE)
	@mkdir -p $(@D)
	CGO_ENABLED=0 GOOS=$(firstword $($*) $*) GOARCH=386 $(GOBUILD) -o $@

release: $(ALL)
ifndef desc
	@echo "Run it as 'make release desc=tralala'"
else
	github-release release -u piranha -r goreplace --tag "$(TAG)" --name "$(TAG)" --description "$(desc)"
	@for x in $(ALL); do \
		github-release upload -u piranha \
                              -r goreplace \
                              --tag "$(TAG)" \
                              --name "$$(basename $$x)" \
                              --file "$$x"; \
		echo "Uploaded $$x"; \
	done
endif
<commit_msg>no more versions in file name for releases<commit_after>SOURCE = $(wildcard *.go)
TAG = $(shell git describe --tags)
GOBUILD = go build -ldflags '-w'

ALL = \
	$(foreach arch,32 64,\
	$(foreach suffix,win.exe osx linux,\
		build/gr-$(arch)-$(suffix)))

all: $(ALL)

clean:
	rm -f $(ALL)

# cram is a python app, so 'easy_install/pip install cram' to run tests
test:
	cram tests/main.t

# os is determined as thus: if variable of suffix exists, it's taken, if not, then
# suffix itself is taken
win.exe = windows
osx = darwin
build/gr-64-%: $(SOURCE)
	@mkdir -p $(@D)
	CGO_ENABLED=0 GOOS=$(firstword $($*) $*) GOARCH=amd64 $(GOBUILD) -o $@

build/gr-32-%: $(SOURCE)
	@mkdir -p $(@D)
	CGO_ENABLED=0 GOOS=$(firstword $($*) $*) GOARCH=386 $(GOBUILD) -o $@

release: $(ALL)
ifndef desc
	@echo "Run it as 'make release desc=tralala'"
else
	github-release release -u piranha -r goreplace -t "$(TAG)" -n "$(TAG)" --description "$(desc)"
	@for x in $(ALL); do \
		github-release upload -u piranha \
                              -r goreplace \
                              -t $(TAG) \
                              -f "$$x" \
                              -n "$$(basename $$x)" \
		&& echo "Uploaded $$x"; \
	done
endif

{'fraction_non_alphanumeric': 0.1791290057518488, 'fraction_numerical': 0.012325390304026294, 'mean_word_length': 2.415147265077139, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6548714', 'n_tokens_mistral': 903, 'n_tokens_neox': 857, 'n_words': 273}