4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-07 03:04:03 +00:00

Add CI fixes and improvements (#780)

* Update GolangCI-lint and lint config

The `algo` parameter for the `unparam` linter has been removed and we
should thus no longer specify it. Also, bumping the GolangCI-lint
version to the latest available minor release.

See: mvdan/unparam@e6a6d1c51b

* Fix and improve bintray CI script

* Further CI setup improvements

* Split-out CI steps into stand-alone scripts
This commit is contained in:
Duco van Amstel
2019-04-04 21:54:51 +01:00
committed by Wim
parent 17cc14a9d2
commit 7f0e4ad448
5 changed files with 74 additions and 61 deletions

17
ci/lint.sh Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -u -e -x -o pipefail
if [[ -n "${GOLANGCI_VERSION-}" ]]; then
# Retrieve the golangci-lint linter binary.
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ${GOPATH}/bin ${GOLANGCI_VERSION}
fi
# Run the linter.
golangci-lint run
if [[ "${GO111MODULE-off}" == "on" ]]; then
# If Go modules are active then check that dependencies are correctly maintained.
go mod tidy
go mod vendor
git diff --exit-code --quiet || (echo "Please run 'go mod tidy' to clean up the 'go.mod' and 'go.sum' files."; false)
fi