From 5f25cfa9e5feba36483a11ac39487060c2082a03 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 15 Dec 2021 15:14:05 -0800 Subject: [PATCH] DEVOPS-5350: Update golangci-lint to the latest version (#9) * build: add bootstrap script * feat(golangci-lint): update to v1.43.0 --- script/README.md | 1 + script/bootstrap | 17 +++++++++++++++++ versions.env | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) mode change 100644 => 100755 script/README.md create mode 100755 script/bootstrap diff --git a/script/README.md b/script/README.md old mode 100644 new mode 100755 index 9ab404d..aad8432 --- a/script/README.md +++ b/script/README.md @@ -2,4 +2,5 @@ This directory contains scripts which are useful for repository management. +- `bootstrap` - Prepare your local environment to work with this repository - `build` - Builds container images in a consistent manner diff --git a/script/bootstrap b/script/bootstrap new file mode 100755 index 0000000..a44ed70 --- /dev/null +++ b/script/bootstrap @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e + +# Bash color variables +COLOR_GREEN="\x1b[32;01m" +COLOR_RESET="\x1b[39;49;00m" + +echo -e "🚀 Bootstrapping project..."$COLOR_RESET + +if [[ $CI != "true" ]]; then + echo -e "⚓ Setting up commit hooks" + pre-commit install + pre-commit install --hook-type commit-msg +fi + +echo -e $COLOR_GREEN"✅ Done\n"$COLOR_RESE diff --git a/versions.env b/versions.env index 56d49af..214b778 100644 --- a/versions.env +++ b/versions.env @@ -4,7 +4,7 @@ docker_compose_version=1.29.2 gocyclo_version=0.3.1 goimports_version=0.1.5 golang_version=1.16-buster -golangci_lint_version=1.41.1 +golangci_lint_version=1.43.0 gosec_version=2.8.1 gotools_version=1.0.0 pre_commit_version=2.13.0