<commit_before>export DOCKER_REG_USERNAME ?=
export DOCKER_REG_PASSWORD ?=


export GIT_SHA = $(shell git rev-parse --short HEAD)
export BUILD_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
export APP_VERSION ?=  $(shell git describe --exact-match 2>/dev/null)


DEPLOY_IMAGE_NAME ?= deitch/yq
BUILD_IMAGE_NAME ?= yq_build

.PHONY: build push

build:
	docker build -t $(BUILD_IMAGE_NAME) -f Dockerfile.build .
	# build the minimal image we need and extract it
	docker run -v $(PWD)/dist:/vol $(BUILD_IMAGE_NAME) sh -c 'cp yq* /vol'
	docker build -t $(DEPLOY_IMAGE_NAME) .

push:
# push to docker registry and push the binary itself to github - but only if this last commit was tagged
ifneq ($(strip $(APP_VERSION)),)
	github-release release -u deitch -r yq --tag $(APP_VERSION)
	github-release upload -u deitch -r yq --tag $(APP_VERSION) --name yq-darwin-amd64 --file dist/yq-darwin-amd64
	github-release upload -u deitch -r yq --tag $(APP_VERSION) --name yq-linux-amd64 --file dist/yq-linux-amd64
	github-release upload -u deitch -r yq --tag $(APP_VERSION) --name yq-windows-amd64 --file dist/yq-windows-amd64.exe
	docker push $(DEPLOY_IMAGE_NAME)
	echo "was not blank"
endif

tests:
	IMAGE=$(DEPLOY_IMAGE_NAME) ./test.sh<commit_msg>Remove unused output line from Makefile<commit_after>export DOCKER_REG_USERNAME ?=
export DOCKER_REG_PASSWORD ?=


export GIT_SHA = $(shell git rev-parse --short HEAD)
export BUILD_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
export APP_VERSION ?=  $(shell git describe --exact-match 2>/dev/null)


DEPLOY_IMAGE_NAME ?= deitch/yq
BUILD_IMAGE_NAME ?= yq_build

.PHONY: build push

build:
	docker build -t $(BUILD_IMAGE_NAME) -f Dockerfile.build .
	# build the minimal image we need and extract it
	docker run -v $(PWD)/dist:/vol $(BUILD_IMAGE_NAME) sh -c 'cp yq* /vol'
	docker build -t $(DEPLOY_IMAGE_NAME) .

push:
# push to docker registry and push the binary itself to github - but only if this last commit was tagged
ifneq ($(strip $(APP_VERSION)),)
	github-release release -u deitch -r yq --tag $(APP_VERSION)
	github-release upload -u deitch -r yq --tag $(APP_VERSION) --name yq-darwin-amd64 --file dist/yq-darwin-amd64
	github-release upload -u deitch -r yq --tag $(APP_VERSION) --name yq-linux-amd64 --file dist/yq-linux-amd64
	github-release upload -u deitch -r yq --tag $(APP_VERSION) --name yq-windows-amd64 --file dist/yq-windows-amd64.exe
	docker push $(DEPLOY_IMAGE_NAME)
endif

tests:
	IMAGE=$(DEPLOY_IMAGE_NAME) ./test.sh
{'fraction_non_alphanumeric': 0.12419354838709677, 'fraction_numerical': 0.010483870967741936, 'mean_word_length': 3.9919517102615694, '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': '2379216', 'n_tokens_mistral': 941, 'n_tokens_neox': 882, 'n_words': 280}