<commit_before># shell is set so new path is picked up
SHELL := /bin/bash
export PATH := $(shell go env GOPATH)/bin:$(PATH)

GO_DIRS := $(shell find . -name "*.go" -exec dirname {} \; | grep -v vendor | grep -v proto | sort -u)

dev:
	make -C admin
	go build .

osx: admin build-darwin
linux: admin build-linux
admin:
	make -C admin production
build-%:
	GOOS=$* GOARCH=amd64 go build \
	     -ldflags="-s -w" \
	     -gcflags=-trimpath=$$GOPATH \
	     -asmflags=-trimpath=$$GOPATH \
	     .

release: goreleaser.yml
	goreleaser
release-nr: goreleaser.yml
	goreleaser --skip-publish
goreleaser.yml:
	@cat ./goreleaser.yml.tmpl \
		| sed -e "s,{GOPATH},$$GOPATH,g" \
		> goreleaser.yml

include make/*.mk

prepare: prepare-admin prepare-vendor
prepare-admin:
	make -C admin prepare
prepare-vendor:
	go get -u github.com/kardianos/govendor
	govendor sync

goimports:
	@goimports -w -local github.com/ketchuphq/ketchup $(GO_DIRS)

test:
	@go test $(GO_DIRS)

integration:
	@go test -tags integration $(GO_DIRS)

cover:
	@go get -u github.com/go-playground/overalls
	overalls -project github.com/ketchuphq/ketchup -- -tags integration
	@find . -name 'profile.coverprofile' | xargs rm

circle-cover: cover
	@go get -u github.com/mattn/goveralls
	@goveralls \
		-coverprofile=overalls.coverprofile \
		-service=circle-ci \
		-repotoken=$$COVERALLS_TOKEN


.PHONY: admin goreleaser.yml

<commit_msg>makefile: Build prod assets for release.<commit_after># shell is set so new path is picked up
SHELL := /bin/bash
export PATH := $(shell go env GOPATH)/bin:$(PATH)

GO_DIRS := $(shell find . -name "*.go" -exec dirname {} \; | grep -v vendor | grep -v proto | sort -u)

dev:
	make -C admin
	go build .

osx: admin build-darwin
linux: admin build-linux
admin:
	make -C admin production
build-%:
	GOOS=$* GOARCH=amd64 go build \
	     -ldflags="-s -w" \
	     -gcflags=-trimpath=$$GOPATH \
	     -asmflags=-trimpath=$$GOPATH \
	     .

release: goreleaser.yml admin
	goreleaser
release-nr: goreleaser.yml admin
	goreleaser --skip-publish
goreleaser.yml:
	@cat ./goreleaser.yml.tmpl \
		| sed -e "s,{GOPATH},$$GOPATH,g" \
		> goreleaser.yml

include make/*.mk

prepare: prepare-admin prepare-vendor
prepare-admin:
	make -C admin prepare
prepare-vendor:
	go get -u github.com/kardianos/govendor
	govendor sync

goimports:
	@goimports -w -local github.com/ketchuphq/ketchup $(GO_DIRS)

test:
	@go test $(GO_DIRS)

integration:
	@go test -tags integration $(GO_DIRS)

cover:
	@go get -u github.com/go-playground/overalls
	overalls -project github.com/ketchuphq/ketchup -- -tags integration
	@find . -name 'profile.coverprofile' | xargs rm

circle-cover: cover
	@go get -u github.com/mattn/goveralls
	@goveralls \
		-coverprofile=overalls.coverprofile \
		-service=circle-ci \
		-repotoken=$$COVERALLS_TOKEN


.PHONY: admin goreleaser.yml


{'fraction_non_alphanumeric': 0.13531703861140632, 'fraction_numerical': 0.0014169323414806943, 'mean_word_length': 3.405616224648986, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2900986', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1084, 'n_words': 275}