Commit a20119db by Arve Knudsen Committed by GitHub

Chore: Upgrade golangci-lint (#31330)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent a34bc0f2
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
## Common variable declarations ## Common variable declarations
## ##
DOCKER_IMAGE_NAME="grafana/grafana-plugin-ci:1.1.3-alpine" DOCKER_IMAGE_NAME="grafana/grafana-plugin-ci:1.2.0-alpine"
...@@ -23,11 +23,11 @@ get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "0d142143794721bb ...@@ -23,11 +23,11 @@ get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "0d142143794721bb
untar_file "/tmp/$filename" untar_file "/tmp/$filename"
# Install golangci-lint # Install golangci-lint
GOLANGCILINT_VERSION=1.36.0 GOLANGCILINT_VERSION=1.37.0
filename="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64" filename="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64"
get_file "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/$filename.tar.gz" \ get_file "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/$filename.tar.gz" \
"/tmp/$filename.tar.gz" \ "/tmp/$filename.tar.gz" \
"9b8856b3a1c9bfbcf3a06b78e94611763b79abd9751c245246787cd3bf0e78a5" "5fe9852e754b621c5264fb8ac810a75033e7f18e972315a60c5c3f8a37b3cb88"
untar_file "/tmp/$filename.tar.gz" untar_file "/tmp/$filename.tar.gz"
ln -s /usr/local/${filename}/golangci-lint /usr/local/bin/golangci-lint ln -s /usr/local/${filename}/golangci-lint /usr/local/bin/golangci-lint
ln -s /usr/local/go/bin/go /usr/local/bin/go ln -s /usr/local/go/bin/go /usr/local/bin/go
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
## ##
DOCKER_IMAGE_BASE_NAME="grafana/grafana-plugin-ci-e2e" DOCKER_IMAGE_BASE_NAME="grafana/grafana-plugin-ci-e2e"
DOCKER_IMAGE_VERSION="1.1.1" DOCKER_IMAGE_VERSION="1.2.0"
DOCKER_IMAGE_NAME="${DOCKER_IMAGE_BASE_NAME}:${DOCKER_IMAGE_VERSION}" DOCKER_IMAGE_NAME="${DOCKER_IMAGE_BASE_NAME}:${DOCKER_IMAGE_VERSION}"
...@@ -27,11 +27,11 @@ get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "0d142143794721bb ...@@ -27,11 +27,11 @@ get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "0d142143794721bb
untar_file "/tmp/$filename" untar_file "/tmp/$filename"
# Install golangci-lint # Install golangci-lint
GOLANGCILINT_VERSION=1.36.0 GOLANGCILINT_VERSION=1.37.0
filename="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64" filename="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64"
get_file "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/$filename.tar.gz" \ get_file "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/$filename.tar.gz" \
"/tmp/$filename.tar.gz" \ "/tmp/$filename.tar.gz" \
"9b8856b3a1c9bfbcf3a06b78e94611763b79abd9751c245246787cd3bf0e78a5" "5fe9852e754b621c5264fb8ac810a75033e7f18e972315a60c5c3f8a37b3cb88"
untar_file "/tmp/$filename.tar.gz" untar_file "/tmp/$filename.tar.gz"
ln -s /usr/local/${filename}/golangci-lint /usr/local/bin/golangci-lint ln -s /usr/local/${filename}/golangci-lint /usr/local/bin/golangci-lint
ln -s /usr/local/go/bin/go /usr/local/bin/go ln -s /usr/local/go/bin/go /usr/local/bin/go
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
## Common variable declarations ## Common variable declarations
## ##
DOCKER_IMAGE_NAME="grafana/grafana-plugin-ci:1.1.1" DOCKER_IMAGE_NAME="grafana/grafana-plugin-ci:1.2.0"
...@@ -7,11 +7,11 @@ get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "0d142143794721bb ...@@ -7,11 +7,11 @@ get_file "https://dl.google.com/go/$filename" "/tmp/$filename" "0d142143794721bb
untar_file "/tmp/$filename" untar_file "/tmp/$filename"
# Install golangci-lint # Install golangci-lint
GOLANGCILINT_VERSION=1.36.0 GOLANGCILINT_VERSION=1.37.0
filename="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64" filename="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64"
get_file "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/$filename.tar.gz" \ get_file "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/$filename.tar.gz" \
"/tmp/$filename.tar.gz" \ "/tmp/$filename.tar.gz" \
"9b8856b3a1c9bfbcf3a06b78e94611763b79abd9751c245246787cd3bf0e78a5" "5fe9852e754b621c5264fb8ac810a75033e7f18e972315a60c5c3f8a37b3cb88"
untar_file "/tmp/$filename.tar.gz" untar_file "/tmp/$filename.tar.gz"
ln -s /usr/local/${filename}/golangci-lint /usr/local/bin/golangci-lint ln -s /usr/local/${filename}/golangci-lint /usr/local/bin/golangci-lint
ln -s /usr/local/go/bin/go /usr/local/bin/go ln -s /usr/local/go/bin/go /usr/local/bin/go
......
...@@ -21,10 +21,10 @@ RUN mkdir -p "C:\Program Files (x86)\GnuWin32" ...@@ -21,10 +21,10 @@ RUN mkdir -p "C:\Program Files (x86)\GnuWin32"
RUN cd "C:\Program Files (x86)\GnuWin32" && unzip C:\App\diffutils-dep.zip && unzip C:\App\diffutils-bin.zip RUN cd "C:\Program Files (x86)\GnuWin32" && unzip C:\App\diffutils-dep.zip && unzip C:\App\diffutils-bin.zip
RUN powershell (New-Object Net.WebClient).DownloadFile(\ RUN powershell (New-Object Net.WebClient).DownloadFile(\
\"https://github.com/golangci/golangci-lint/releases/download/v1.32.0/golangci-lint-1.32.0-windows-amd64.zip\", \ \"https://github.com/golangci/golangci-lint/releases/download/v1.37.0/golangci-lint-1.37.0-windows-amd64.zip\", \
\"golangci-lint.zip\") \"golangci-lint.zip\")
RUN powershell (Get-FileHash golangci-lint.zip -Algorithm SHA256).Hash -eq \ RUN powershell (Get-FileHash golangci-lint.zip -Algorithm SHA256).Hash -eq \
\"97a69c2a153cd4285b7000b327aa6e77b694534e7463cbd1b77481c22b6113cf\" \"4b72c442d78a80bdfb7a775a55a9296beecc80afff6ef6ce9c727a573031278d"
RUN unzip golangci-lint.zip RUN unzip golangci-lint.zip
RUN powershell -Command mv golangci-lint-1.32.0-windows-amd64\golangci-lint.exe . RUN powershell -Command mv golangci-lint-1.32.0-windows-amd64\golangci-lint.exe .
......
...@@ -7,7 +7,7 @@ import ( ...@@ -7,7 +7,7 @@ import (
"github.com/magefile/mage/sh" "github.com/magefile/mage/sh"
) )
const imageName = "grafana/ci-build-windows:0.1.5" const imageName = "grafana/ci-build-windows:0.2.0"
// Build builds the Docker image. // Build builds the Docker image.
func Build() error { func Build() error {
......
...@@ -76,8 +76,8 @@ RUN cd /tmp && \ ...@@ -76,8 +76,8 @@ RUN cd /tmp && \
rm -rf /tmp/x86_64-centos6-linux-gnu/ && \ rm -rf /tmp/x86_64-centos6-linux-gnu/ && \
rm -rf /tmp/crosstool-ng-${CTNG} rm -rf /tmp/crosstool-ng-${CTNG}
ARG GOLANGCILINT_VERSION=1.34.1 ARG GOLANGCILINT_VERSION=1.37.0
ARG GOLANGCILINT_CHKSUM=23e4a9d8f89729007c6d749c245f725c2dbcfb194f4099003f9b826f1d386ad1 ARG GOLANGCILINT_CHKSUM=5fe9852e754b621c5264fb8ac810a75033e7f18e972315a60c5c3f8a37b3cb88
RUN curl -fLO https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64.tar.gz RUN curl -fLO https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64.tar.gz
RUN echo ${GOLANGCILINT_CHKSUM} golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64.tar.gz | sha256sum --check --strict --status RUN echo ${GOLANGCILINT_CHKSUM} golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64.tar.gz | sha256sum --check --strict --status
......
#!/bin/bash #!/bin/bash
set -eo pipefail set -eo pipefail
_version="1.3.2" _version="1.4.0"
_tag="grafana/build-container:${_version}" _tag="grafana/build-container:${_version}"
_dpath=$(dirname "${BASH_SOURCE[0]}") _dpath=$(dirname "${BASH_SOURCE[0]}")
......
...@@ -3,13 +3,11 @@ module github.com/grafana/grafana/scripts/go ...@@ -3,13 +3,11 @@ module github.com/grafana/grafana/scripts/go
go 1.14 go 1.14
require ( require (
github.com/golangci/golangci-lint v1.32.2 github.com/golangci/golangci-lint v1.37.0
github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mgechev/revive v1.0.2 github.com/mgechev/revive v1.0.3
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8
github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a // indirect github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a // indirect
github.com/urfave/cli v1.22.5 // indirect github.com/urfave/cli v1.22.5 // indirect
golang.org/x/sys v0.0.0-20201113233024-12cec1faf1ba // indirect
golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b // indirect
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment