<commit_before>REPO_ROOT=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))

# Binary Output
BIN_DIR=$(REPO_ROOT)/bin
CONTROLLER_BIN=$(BIN_DIR)/import-controller
IMPORTER_BIN=$(BIN_DIR)/vm-importer

# Source dirs
CMD_DIR=$(REPO_ROOT)/cmd
CONTROLLER_CMD=$(CMD_DIR)/controller
IMPORTER_CMD=$(CMD_DIR)/importer

# Build Dirs
BUILD_DIR=$(REPO_ROOT)/build
CONTROLLER_BUILD=$(BUILD_DIR)/controller
IMPORTER_BUILD=$(BUILD_DIR)/importer

# DOCKER TAG VARS
REGISTRY=gcr.io/openshift-gce-devel
CONTROLLER_IMAGE=import-controller
IMPORTER_IMAGE=vm-importer
DIRTY_HASH=$(shell git describe --always --abbrev=7 --dirty)
VERSION=v1

.PHONY: controller controller_image vm_importer vm_importer_image clean #release push
all: clean controller controller_image importer importer_image

# Compile controller binary
controller:
	go build -i -o $(CONTROLLER_BIN) $(CONTROLLER_CMD)/*.go

# Compile importer binary
importer:
	go build -i -o $(IMPORTER_BIN) $(IMPORTER_CMD)/*.go

# build the controller image
controller_image: $(CONTROLLER_BUILD)/Dockerfile
	$(eval TEMP_BUILD_DIR=$(CONTROLLER_BUILD)/tmp)
	mkdir -p $(TEMP_BUILD_DIR)
	cp $(CONTROLLER_BIN) $(TEMP_BUILD_DIR)
	cp $(CONTROLLER_BUILD)/Dockerfile $(TEMP_BUILD_DIR)
	docker build -t $(CONTROLLER_IMAGE) $(TEMP_BUILD_DIR)
	docker tag $(CONTROLLER_IMAGE) $(REGISTRY)/$(CONTROLLER_IMAGE):$(DIRTY_HASH)
	rm -rf $(TEMP_BUILD_DIR)

# build the controller image
importer_image: $(IMPORTER_BUILD)/Dockerfile<commit_msg>Changed make targets with _ to -<commit_after>REPO_ROOT=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))

# Binary Output
BIN_DIR=$(REPO_ROOT)/bin
CONTROLLER_BIN=$(BIN_DIR)/import-controller
IMPORTER_BIN=$(BIN_DIR)/vm-importer

# Source dirs
CMD_DIR=$(REPO_ROOT)/cmd
CONTROLLER_CMD=$(CMD_DIR)/controller
IMPORTER_CMD=$(CMD_DIR)/importer

# Build Dirs
BUILD_DIR=$(REPO_ROOT)/build
CONTROLLER_BUILD=$(BUILD_DIR)/controller
IMPORTER_BUILD=$(BUILD_DIR)/importer

# DOCKER TAG VARS
REGISTRY=gcr.io/openshift-gce-devel
CONTROLLER_IMAGE=import-controller
IMPORTER_IMAGE=vm-importer
DIRTY_HASH=$(shell git describe --always --abbrev=7 --dirty)
VERSION=v1

.PHONY: controller controller_image vm_importer vm_importer_image clean #release push
all: clean controller controller_image importer importer_image

# Compile controller binary
controller:
	go build -i -o $(CONTROLLER_BIN) $(CONTROLLER_CMD)/*.go

# Compile importer binary
importer:
	go build -i -o $(IMPORTER_BIN) $(IMPORTER_CMD)/*.go

# build the controller image
controller-image: $(CONTROLLER_BUILD)/Dockerfile
	$(eval TEMP_BUILD_DIR=$(CONTROLLER_BUILD)/tmp)
	mkdir -p $(TEMP_BUILD_DIR)
	cp $(CONTROLLER_BIN) $(TEMP_BUILD_DIR)
	cp $(CONTROLLER_BUILD)/Dockerfile $(TEMP_BUILD_DIR)
	docker build -t $(CONTROLLER_IMAGE) $(TEMP_BUILD_DIR)
	docker tag $(CONTROLLER_IMAGE) $(REGISTRY)/$(CONTROLLER_IMAGE):$(DIRTY_HASH)
	rm -rf $(TEMP_BUILD_DIR)

# build the controller image
importer-image: $(IMPORTER_BUILD)/Dockerfile
{'fraction_non_alphanumeric': 0.124785149535923, 'fraction_numerical': 0.0013750429700928155, 'mean_word_length': 7.508771929824562, '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': '268668', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1066, 'n_words': 206}