<commit_before>.PHONY: build install autolint clean test

THIS_FILE := $(lastword $(MAKEFILE_LIST))
ROOT_DIR = $(shell pwd)
SHELL = bash # for `time`
GIT_REF_SHA=$(shell git rev-parse --short HEAD)
CMDS=$(shell ls cmd)
GIT_REF_LABEL=$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)
GIT_DIRTY=$(shell git diff-index --quiet HEAD; echo $$? | sed 's/1/-dirty/' | sed 's/0//')
BUILD_TIME=$(shell date +%FT%T%z)
PKG_PATH=github.com/codeactual/ec2metaproxy
LDFLAGS=-ldflags "-X ${PKG_PATH}/version.SCM=${GIT_REF_SHA}-${GIT_REF_LABEL}${GIT_DIRTY} -X ${PKG_PATH}/version.BuildTime=${BUILD_TIME}"

precheck:
ifneq ($(CGO_ENABLED),0)
	$(error precheck: CGO_ENABLED is not 0 in environment)
endif

build:
	@mkdir -p build
	@go build ${LDFLAGS} -v -o build/ec2metaproxy

install:
	@go install ${LDFLAGS} .

autolint:
	@reflex -c reflex.conf

clean:
	@go clean -i

test:
	@CGO_ENABLED=1 go test -v -race github.com/codeactual/ec2metaproxy/proxy

-include precheck
<commit_msg>fix(make): don't assume bash presence for alpine<commit_after>.PHONY: build install autolint clean test

THIS_FILE := $(lastword $(MAKEFILE_LIST))
ROOT_DIR = $(shell pwd)
GIT_REF_SHA=$(shell git rev-parse --short HEAD)
CMDS=$(shell ls cmd)
GIT_REF_LABEL=$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)
GIT_DIRTY=$(shell git diff-index --quiet HEAD; echo $$? | sed 's/1/-dirty/' | sed 's/0//')
BUILD_TIME=$(shell date +%FT%T%z)
PKG_PATH=github.com/codeactual/ec2metaproxy
LDFLAGS=-ldflags "-X ${PKG_PATH}/version.SCM=${GIT_REF_SHA}-${GIT_REF_LABEL}${GIT_DIRTY} -X ${PKG_PATH}/version.BuildTime=${BUILD_TIME}"

precheck:
ifneq ($(CGO_ENABLED),0)
	$(error precheck: CGO_ENABLED is not 0 in environment)
endif

build:
	@mkdir -p build
	@go build ${LDFLAGS} -v -o build/ec2metaproxy

install:
	@go install ${LDFLAGS} .

autolint:
	@reflex -c reflex.conf

clean:
	@go clean -i

test:
	@CGO_ENABLED=1 go test -v -race github.com/codeactual/ec2metaproxy/proxy

-include precheck

{'fraction_non_alphanumeric': 0.15839598997493734, 'fraction_numerical': 0.008020050125313283, 'mean_word_length': 4.887905604719764, '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': '6728026', 'n_tokens_mistral': 807, 'n_tokens_neox': 786, 'n_words': 194}