Skip to content

Commit

Permalink
update script to previous golangci-lint to make release
Browse files Browse the repository at this point in the history
  • Loading branch information
ivvist committed Sep 30, 2024
1 parent 4f0b19e commit 5a1cdc6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions scripts/gbash.s_
Original file line number Diff line number Diff line change
@@ -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/[email protected]

# echo "Run cyclop"
# $(go env GOPATH)/bin/cyclop -skipSwitch=true -skipTests=true -maxComplexity 12 ./...
else
exit 1
fi

2 changes: 1 addition & 1 deletion scripts/gbash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5a1cdc6

Please sign in to comment.