From 4c2fdf7b1446423b9f8be47ad96a2c37214fc141 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 10 Jan 2024 16:31:29 -0500 Subject: [PATCH] Remove tools dir/refs It's no longer needed now that we're using bingo. Signed-off-by: Andy Goldstein --- Makefile | 7 ++----- tools/scripts/fetch | 36 ------------------------------------ 2 files changed, 2 insertions(+), 41 deletions(-) delete mode 100755 tools/scripts/fetch diff --git a/Makefile b/Makefile index 16e6c4fc..6e46b650 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,7 @@ export GO111MODULE = on # Setup project-local paths and build settings SHELL=/bin/bash -TOOLS_DIR=$(PWD)/tools -TOOLS_BIN_DIR=$(TOOLS_DIR)/bin -SCRIPTS_DIR=$(TOOLS_DIR)/scripts -export PATH := $(BUILD_DIR):$(TOOLS_BIN_DIR):$(SCRIPTS_DIR):$(PATH) +export PATH := $(BUILD_DIR):$(PATH) # bingo manages consistent tooling versions for things like kind, kustomize, etc. include .bingo/Variables.mk @@ -82,4 +79,4 @@ release: $(GORELEASER) .PHONY: clean clean: - rm -rf $(TOOLS_BIN_DIR) $(BUILD_DIR) + rm -rf $(BUILD_DIR) diff --git a/tools/scripts/fetch b/tools/scripts/fetch deleted file mode 100755 index 3e277249..00000000 --- a/tools/scripts/fetch +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -ROOT="$(git rev-parse --show-toplevel)" -DEST="${ROOT}/tools/bin" - -fetch() { - local tool=$1; shift - local ver=$1; shift - - local ver_cmd="" - local fetch_cmd="" - case "$tool" in - "golangci-lint") - ver_cmd="${DEST}/golangci-lint --version 2>/dev/null | cut -d\" \" -f4" - fetch_cmd="curl -sSfL \"https://raw.githubusercontent.com/golangci/golangci-lint/v${ver}/install.sh\" | sh -s -- -b \"${DEST}\" \"v${ver}\"" - ;; - "goreleaser") - ver_cmd="${DEST}/goreleaser --version 2>/dev/null | grep version | cut -d' ' -f3" - osCap="$(uname -s)" - archBase="$(uname -m)" - fetch_cmd="(curl -sSfLo '${DEST}/goreleaser.tar.gz' 'https://github.com/goreleaser/goreleaser/releases/download/v${ver}/goreleaser_${osCap}_${archBase}.tar.gz' && tar -xf $DEST/goreleaser.tar.gz -C $DEST)" - ;; - *) - echo "unknown tool $tool" - return 1 - ;; - esac - - if [[ "${ver}" != "$(eval ${ver_cmd})" ]]; then - echo "${tool} missing or not version '${ver}', downloading..." - mkdir -p ${DEST} - eval ${fetch_cmd} - fi -} - -fetch $@