diff --git a/Makefile b/Makefile index 9a92155f..39f6d65c 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ checkcoverage: .PHONY: lint lint: - @if ! $(gopath)/bin/golangci-lint --version &>/dev/null; then \ + @if [ ! -z "${CI_ONLY}" ]; then \ echo "Installing linters..."; \ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(gopath)/bin v1.55.2; \ fi diff --git a/entrypoint.sh b/entrypoint.sh index 04c467f7..8bfea375 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,6 +3,8 @@ cd /home/clr/mixer-tools run_precheck() { make && sudo -E make install + export CI_ONLY=1 + export GOLANGCI_LINT_CACHE=/tmp/.golangci-lint make lint && make check }