<commit_before>SHELL = bash

export GOOS=$(or $(word 1,$(subst -, ,${TARGET_PLATFORM})), $(shell echo "`go env GOOS`"))
export GOARCH=$(or $(word 2,$(subst -, ,${TARGET_PLATFORM})), $(shell echo "`go env GOARCH`"))
export GOEXE=$(shell echo "`GOOS=$(GOOS) GOARCH=$(GOARCH) go env GOEXE`")
export CGO_ENABLED=0

GOCMD = go
GOBUILD = $(GOCMD) build

PROTOC = protoc --gofast_out=plugins=grpc:$(GOPATH)/src/ --proto_path=$(GOPATH)/src/ $(GOPATH)/src/github.com/TheThingsNetwork/ttn

GIT_COMMIT = `git rev-parse HEAD 2>/dev/null`
BUILD_DATE = `date -u +%Y-%m-%dT%H:%M:%SZ`

LDFLAGS = -ldflags "-w -X main.gitCommit=${GIT_COMMIT} -X main.buildDate=${BUILD_DATE}"

DEPS = `comm -23 <(sort <($(GOCMD) list -f '{{join .Imports "\n"}}' ./...) | uniq) <($(GOCMD) list std) | grep -v TheThingsNetwork`
TEST_DEPS = `comm -23 <(sort <($(GOCMD) list -f '{{join .TestImports "\n"}}' ./...) | uniq) <($(GOCMD) list std) | grep -v TheThingsNetwork`

select_pkgs = $(GOCMD) list ./... | grep -vE 'vendor|ttnctl'
coverage_pkgs = $(GOCMD) list ./... | grep -E 'core' | grep -vE 'core$$|mocks$$'

RELEASE_DIR ?= release
COVER_FILE = coverage.out
TEMP_COVER_DIR ?= .cover

ttnpkg = ttn-$(GOOS)-$(GOARCH)
ttnctlpkg = ttnctl-$(GOOS)-$(GOARCH)

ttnbin = $(ttnpkg)$(GOEXE)
ttnctlbin = $(ttnctlpkg)$(GOEXE)

.PHONY: all clean deps update-deps test-deps proto-deps dev-deps cover-deps proto test fmt vet cover coveralls build install docker package

all: clean deps build package

deps:
	$(GOCMD) get -d -v $(DEPS)

update-deps:
	$(GOCMD) get -u -d -v $(DEPS)

test-deps:
	$(GOCMD) get -d -v $(TEST_DEPS)

proto-deps:
	$(GOCMD) get -v github.com/gogo/protobuf/protoc-gen-gofast

dev-deps: update-deps proto-deps test-deps<commit_msg>Update test coverage pkgs in Makefile<commit_after>SHELL = bash

export GOOS=$(or $(word 1,$(subst -, ,${TARGET_PLATFORM})), $(shell echo "`go env GOOS`"))
export GOARCH=$(or $(word 2,$(subst -, ,${TARGET_PLATFORM})), $(shell echo "`go env GOARCH`"))
export GOEXE=$(shell echo "`GOOS=$(GOOS) GOARCH=$(GOARCH) go env GOEXE`")
export CGO_ENABLED=0

GOCMD = go
GOBUILD = $(GOCMD) build

PROTOC = protoc --gofast_out=plugins=grpc:$(GOPATH)/src/ --proto_path=$(GOPATH)/src/ $(GOPATH)/src/github.com/TheThingsNetwork/ttn

GIT_COMMIT = `git rev-parse HEAD 2>/dev/null`
BUILD_DATE = `date -u +%Y-%m-%dT%H:%M:%SZ`

LDFLAGS = -ldflags "-w -X main.gitCommit=${GIT_COMMIT} -X main.buildDate=${BUILD_DATE}"

DEPS = `comm -23 <(sort <($(GOCMD) list -f '{{join .Imports "\n"}}' ./...) | uniq) <($(GOCMD) list std) | grep -v TheThingsNetwork`
TEST_DEPS = `comm -23 <(sort <($(GOCMD) list -f '{{join .TestImports "\n"}}' ./...) | uniq) <($(GOCMD) list std) | grep -v TheThingsNetwork`

select_pkgs = $(GOCMD) list ./... | grep -vE 'vendor|ttnctl'
coverage_pkgs = $(GOCMD) list ./... | grep -vE 'ttn/api|ttn/cmd|ttn/vendor|ttn/ttnctl'

RELEASE_DIR ?= release
COVER_FILE = coverage.out
TEMP_COVER_DIR ?= .cover

ttnpkg = ttn-$(GOOS)-$(GOARCH)
ttnctlpkg = ttnctl-$(GOOS)-$(GOARCH)

ttnbin = $(ttnpkg)$(GOEXE)
ttnctlbin = $(ttnctlpkg)$(GOEXE)

.PHONY: all clean deps update-deps test-deps proto-deps dev-deps cover-deps proto test fmt vet cover coveralls build install docker package

all: clean deps build package

deps:
	$(GOCMD) get -d -v $(DEPS)

update-deps:
	$(GOCMD) get -u -d -v $(DEPS)

test-deps:
	$(GOCMD) get -d -v $(TEST_DEPS)

proto-deps:
	$(GOCMD) get -v github.com/gogo/protobuf/protoc-gen-gofast

dev-deps: update-deps proto-deps test-deps
{'fraction_non_alphanumeric': 0.20174418604651162, 'fraction_numerical': 0.004651162790697674, 'mean_word_length': 4.384976525821596, 'pattern_counts': {'":': 0, '<': 15, '<?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': '1280482', 'n_tokens_mistral': 1466, 'n_tokens_neox': 1447, 'n_words': 347}