From 5a1cdc66a93daba44a835fd9d7e2bcfd8e8e4425 Mon Sep 17 00:00:00 2001 From: ivvist Date: Mon, 30 Sep 2024 06:34:21 +0200 Subject: [PATCH] update script to previous golangci-lint to make release --- scripts/gbash.s_ | 34 ++++++++++++++++++++++++++++++++++ scripts/gbash.sh | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 scripts/gbash.s_ diff --git a/scripts/gbash.s_ b/scripts/gbash.s_ new file mode 100644 index 0000000..163be16 --- /dev/null +++ b/scripts/gbash.s_ @@ -0,0 +1,34 @@ +echo "argument: $1" + +if [ "$#" -ne 1 ]; then + echo "Please add 1 argument: golangci install folder" + exit 1 +fi + +echo "Install golangci-lint in folder: $1/bin" +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 + +golangci-lint --version + +#echo "Download golangci config" +# curl -o /home/runner/work/.golangci.yaml https://raw.githubusercontent.com/untillpro/ci-action/master/scripts/.golangci.yml + +echo "Run linter jobs" +mydir="" +if test -n "$testfolder"; then + mydir="${testfolder}/..." +fi +$1/bin/golangci-lint run ${mydir} + +status="$?" + +if [ ${status} -eq 0 ]; then + echo "Skip cyclop" +# go install github.com/untillpro/cyclop/cmd/cyclop@v1.2.103 + +# echo "Run cyclop" +# $(go env GOPATH)/bin/cyclop -skipSwitch=true -skipTests=true -maxComplexity 12 ./... +else + exit 1 +fi + diff --git a/scripts/gbash.sh b/scripts/gbash.sh index 163be16..63b6352 100644 --- a/scripts/gbash.sh +++ b/scripts/gbash.sh @@ -6,7 +6,7 @@ if [ "$#" -ne 1 ]; then fi echo "Install golangci-lint in folder: $1/bin" -curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 golangci-lint --version