<commit_before># Requirements: git, go, go dep
NAME     := zatsu_monitor
VERSION  := $(shell cat VERSION)
REVISION := $(shell git rev-parse --short HEAD)

SRCS    := $(shell find . -type f -name '*.go')
LDFLAGS := -ldflags="-s -w -X \"main.Version=$(VERSION)\" -X \"main.Revision=$(REVISION)\" -extldflags \"-static\""

.DEFAULT_GOAL := bin/$(NAME)

bin/$(NAME): $(SRCS)
	GO111MODULE=on go build $(LDFLAGS) -o bin/$(NAME)

.PHONY: clean
clean:
	rm -rf bin/*
	rm -rf dist/*
	rm -rf vendor/

.PHONY: package
package:
	for os in darwin linux windows; do \
		if [ $$os = "windows" ]; then \
			exefile="$(NAME).exe" ; \
		else \
			exefile="$(NAME)" ; \
		fi ; \
		for arch in amd64 386; do \
			GO111MODULE=on GOOS=$$os GOARCH=$$arch go build -a -tags netgo -installsuffix netgo $(LDFLAGS) -o dist/$${os}_$${arch}/$${exefile} ; \
			cd dist/$${os}_$${arch} ; \
			zip ../$(NAME)_$(VERSION)_$${os}_$${arch}.zip $${exefile} ; \
			cd ../.. ; \
		done; \
	done

.PHONY: install
install:
	GO111MODULE=on go install $(LDFLAGS)

.PHONY: test
test:
	GO111MODULE=on go test

.PHONY: tag
tag:
	git tag -a $(VERSION) -m "Release v$(VERSION)"
	git push --tags<commit_msg>Add release task [ci skip]<commit_after># Requirements: git, go, go dep
NAME     := zatsu_monitor
VERSION  := $(shell cat VERSION)
REVISION := $(shell git rev-parse --short HEAD)

SRCS    := $(shell find . -type f -name '*.go')
LDFLAGS := -ldflags="-s -w -X \"main.Version=$(VERSION)\" -X \"main.Revision=$(REVISION)\" -extldflags \"-static\""

.DEFAULT_GOAL := bin/$(NAME)

bin/$(NAME): $(SRCS)
	GO111MODULE=on go build $(LDFLAGS) -o bin/$(NAME)

.PHONY: clean
clean:
	rm -rf bin/*
	rm -rf dist/*
	rm -rf vendor/

.PHONY: package
package:
	for os in darwin linux windows; do \
		if [ $$os = "windows" ]; then \
			exefile="$(NAME).exe" ; \
		else \
			exefile="$(NAME)" ; \
		fi ; \
		for arch in amd64 386; do \
			GO111MODULE=on GOOS=$$os GOARCH=$$arch go build -a -tags netgo -installsuffix netgo $(LDFLAGS) -o dist/$${os}_$${arch}/$${exefile} ; \
			cd dist/$${os}_$${arch} ; \
			zip ../$(NAME)_$(VERSION)_$${os}_$${arch}.zip $${exefile} ; \
			cd ../.. ; \
		done; \
	done

.PHONY: install
install:
	GO111MODULE=on go install $(LDFLAGS)

.PHONY: test
test:
	GO111MODULE=on go test

.PHONY: tag
tag:
	git tag -a $(VERSION) -m "Release v$(VERSION)"
	git push --tags

.PHONY: release
release: tag
	git push origin master
{'fraction_non_alphanumeric': 0.20285594288114236, 'fraction_numerical': 0.014279714405711887, 'mean_word_length': 3.121107266435986, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '577646', 'n_tokens_mistral': 1012, 'n_tokens_neox': 939, 'n_words': 265}