mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-12 04:26:51 +00:00
Updates Makefile so shellcheck is cross-platform. (#1946)
Specifically, it was always downloading the linux version no matter the platform. So I moved the OS detection to be early in the makefile and verified that I can now download the darwin version of shellcheck.
This commit is contained in:
8
Makefile
8
Makefile
@@ -34,6 +34,8 @@ endif
|
|||||||
TEST_ASSETS=$(PWD)/test-assets
|
TEST_ASSETS=$(PWD)/test-assets
|
||||||
TOOLS_PATH=$(PWD)/.tools
|
TOOLS_PATH=$(PWD)/.tools
|
||||||
|
|
||||||
|
OS_NAME := $(shell uname -s | tr A-Z a-z)
|
||||||
|
|
||||||
# default list of platforms for which multiarch image is built
|
# default list of platforms for which multiarch image is built
|
||||||
ifeq (${PLATFORMS}, )
|
ifeq (${PLATFORMS}, )
|
||||||
export PLATFORMS="linux/amd64,linux/arm64"
|
export PLATFORMS="linux/amd64,linux/arm64"
|
||||||
@@ -267,8 +269,8 @@ ifeq (, $(wildcard $(TOOLS_PATH)/shellcheck))
|
|||||||
set -e ;\
|
set -e ;\
|
||||||
SHELLCHECK_TMP_DIR=$$(mktemp -d) ;\
|
SHELLCHECK_TMP_DIR=$$(mktemp -d) ;\
|
||||||
cd $$SHELLCHECK_TMP_DIR ;\
|
cd $$SHELLCHECK_TMP_DIR ;\
|
||||||
curl -LO https://github.com/koalaman/shellcheck/releases/download/v$(SHELLCHECK_VERSION)/shellcheck-v$(SHELLCHECK_VERSION).linux.x86_64.tar.xz ;\
|
curl -LO https://github.com/koalaman/shellcheck/releases/download/v$(SHELLCHECK_VERSION)/shellcheck-v$(SHELLCHECK_VERSION).$(OS_NAME).x86_64.tar.xz ;\
|
||||||
tar Jxvf shellcheck-v$(SHELLCHECK_VERSION).linux.x86_64.tar.xz ;\
|
tar Jxvf shellcheck-v$(SHELLCHECK_VERSION).$(OS_NAME).x86_64.tar.xz ;\
|
||||||
cd $(CURDIR) ;\
|
cd $(CURDIR) ;\
|
||||||
mkdir -p $(TOOLS_PATH) ;\
|
mkdir -p $(TOOLS_PATH) ;\
|
||||||
mv $$SHELLCHECK_TMP_DIR/shellcheck-v$(SHELLCHECK_VERSION)/shellcheck $(TOOLS_PATH)/ ;\
|
mv $$SHELLCHECK_TMP_DIR/shellcheck-v$(SHELLCHECK_VERSION)/shellcheck $(TOOLS_PATH)/ ;\
|
||||||
@@ -277,8 +279,6 @@ ifeq (, $(wildcard $(TOOLS_PATH)/shellcheck))
|
|||||||
endif
|
endif
|
||||||
SHELLCHECK=$(TOOLS_PATH)/shellcheck
|
SHELLCHECK=$(TOOLS_PATH)/shellcheck
|
||||||
|
|
||||||
OS_NAME := $(shell uname -s | tr A-Z a-z)
|
|
||||||
|
|
||||||
# find or download etcd
|
# find or download etcd
|
||||||
etcd:
|
etcd:
|
||||||
ifeq (, $(shell which etcd))
|
ifeq (, $(shell which etcd))
|
||||||
|
|||||||
Reference in New Issue
Block a user