Skip to content

Commit

Permalink
chore: refactor yq installation (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
Demonsthere authored Feb 28, 2025
1 parent 7e6bf06 commit de1deda
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 180 deletions.
2 changes: 2 additions & 0 deletions .deps/yq.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version: v4.45.1
url: https://github.com/mikefarah/yq/releases/download/{{.Version}}/yq_{{.Os}}_{{.Architecture}}
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,21 @@ export PWD := $(shell pwd)
export VERSION=$(shell echo ${RELEASE_VERSION} | sed s/v//g)
export K3SIMAGE := docker.io/rancher/k3s:v1.32.1-k3s1

.bin/yq: go.mod
go build -o .bin/yq github.com/mikefarah/yq/v3

.bin/helm: Makefile
HELM_INSTALL_DIR=.bin bash <(curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3) -v v3.17.0 --no-sudo

.bin/yq: .deps/yq.yaml .bin/ory
ifeq ($(BREW),true)
@echo "yq Provided by brew!"
@echo "${BREW_FORMULA}" | grep yq 1>/dev/null || brew install yq
else
@URL=$$(.bin/ory dev ci deps url -o ${OS} -a ${ARCH} -c .deps/yq.yaml); \
echo "Downloading 'yq' $${URL}...."; \
curl -Lo .bin/yq $${URL}; \
echo; \
chmod +x .bin/yq;
endif

.bin/ory: Makefile
# pin to version v0.3.4 due to a bug in validation
curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.3.4
Expand Down
5 changes: 0 additions & 5 deletions go.mod

This file was deleted.

172 changes: 0 additions & 172 deletions go.sum

This file was deleted.

0 comments on commit de1deda

Please sign in to comment.