-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update script to previous golangci-lint to make release
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters