<commit_before>DIST := build
EXECUTABLE := fathom
LDFLAGS += -extldflags "-static"
MAIN_PKG := ./cmd/fathom
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
JS_SOURCES ?= $(shell find assets/src/. -name "*.js" -type f)
SOURCES ?= $(shell find . -name "*.go" -type f)
ENV ?= $(shell export $(cat .env | xargs))

.PHONY: all
all: build 

.PHONY: install
install: $(wildcard *.go) $(GOPATH)/bin/packr
	$(GOPATH)/bin/packr install -v -ldflags '-w $(LDFLAGS)' $(MAIN_PKG)

.PHONY: build
build: $(EXECUTABLE)

$(EXECUTABLE): $(SOURCES) assets/build $(GOPATH)/bin/packr
	go build -o $@ $(MAIN_PKG) 

dist: assets/dist build/fathom-linux-amd64

build/fathom-linux-amd64: $(GOPATH)/bin/packr
	GOOS=linux GOARCH=amd64 $(GOPATH)/bin/packr build -v -ldflags '-w $(LDFLAGS)' -o $@ $(MAIN_PKG)

$(GOPATH)/bin/packr:
	GOBIN=$(GOPATH)/bin go get github.com/gobuffalo/packr/...

assets/build: $(JS_SOURCES)
	if [ ! -d "node_modules" ]; then npm install; fi
	./node_modules/gulp/bin/gulp.js	
<commit_msg>get /home/d/go from go env if using default gopath<commit_after>DIST := build
EXECUTABLE := fathom
LDFLAGS += -extldflags "-static"
MAIN_PKG := ./cmd/fathom
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
JS_SOURCES ?= $(shell find assets/src/. -name "*.js" -type f)
SOURCES ?= $(shell find . -name "*.go" -type f)
ENV ?= $(shell export $(cat .env | xargs))
GOPATH=$(shell go env GOPATH)

.PHONY: all
all: build 

.PHONY: install
install: $(wildcard *.go) $(GOPATH)/bin/packr
	$(GOPATH)/bin/packr install -v -ldflags '-w $(LDFLAGS)' $(MAIN_PKG)

.PHONY: build
build: $(EXECUTABLE)

$(EXECUTABLE): $(SOURCES) assets/build $(GOPATH)/bin/packr
	go build -o $@ $(MAIN_PKG) 

dist: assets/dist build/fathom-linux-amd64

build/fathom-linux-amd64: $(GOPATH)/bin/packr
	GOOS=linux GOARCH=amd64 $(GOPATH)/bin/packr build -v -ldflags '-w $(LDFLAGS)' -o $@ $(MAIN_PKG)

$(GOPATH)/bin/packr:
	GOBIN=$(GOPATH)/bin go get github.com/gobuffalo/packr/...

assets/build: $(JS_SOURCES)
	if [ ! -d "node_modules" ]; then npm install; fi
	./node_modules/gulp/bin/gulp.js	

{'fraction_non_alphanumeric': 0.19570522205954125, 'fraction_numerical': 0.005856515373352855, 'mean_word_length': 3.880952380952381, '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': '2379063', 'n_tokens_mistral': 877, 'n_tokens_neox': 823, 'n_words': 204}