Skip to content

Commit de1deda

Browse files
authored
chore: refactor yq installation (#749)
1 parent 7e6bf06 commit de1deda

File tree

4 files changed

+14
-180
lines changed

4 files changed

+14
-180
lines changed

.deps/yq.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
version: v4.45.1
2+
url: https://github.com/mikefarah/yq/releases/download/{{.Version}}/yq_{{.Os}}_{{.Architecture}}

Makefile

+12-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@ export PWD := $(shell pwd)
2727
export VERSION=$(shell echo ${RELEASE_VERSION} | sed s/v//g)
2828
export K3SIMAGE := docker.io/rancher/k3s:v1.32.1-k3s1
2929

30-
.bin/yq: go.mod
31-
go build -o .bin/yq github.com/mikefarah/yq/v3
32-
3330
.bin/helm: Makefile
3431
HELM_INSTALL_DIR=.bin bash <(curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3) -v v3.17.0 --no-sudo
3532

33+
.bin/yq: .deps/yq.yaml .bin/ory
34+
ifeq ($(BREW),true)
35+
@echo "yq Provided by brew!"
36+
@echo "${BREW_FORMULA}" | grep yq 1>/dev/null || brew install yq
37+
else
38+
@URL=$$(.bin/ory dev ci deps url -o ${OS} -a ${ARCH} -c .deps/yq.yaml); \
39+
echo "Downloading 'yq' $${URL}...."; \
40+
curl -Lo .bin/yq $${URL}; \
41+
echo; \
42+
chmod +x .bin/yq;
43+
endif
44+
3645
.bin/ory: Makefile
3746
# pin to version v0.3.4 due to a bug in validation
3847
curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.3.4

go.mod

-5
This file was deleted.

go.sum

-172
This file was deleted.

0 commit comments

Comments
 (0)