-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): bump up go version, add ua to ga #180
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
# limitations under the License. | ||
# list only csi source code directories | ||
# | ||
PACKAGES = $(shell go list ./... | grep -v 'vendor\|pkg/client\|tests') | ||
PACKAGES = $(shell go list ./... | grep -v 'pkg/client\|tests') | ||
|
||
# Lint our code. Reference: https://golang.org/cmd/vet/ | ||
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \ | ||
|
@@ -22,11 +22,10 @@ VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \ | |
# Tools required for different make | ||
# targets or for development purposes | ||
EXTERNAL_TOOLS=\ | ||
golang.org/x/tools/cmd/cover \ | ||
github.com/axw/gocov/gocov \ | ||
gopkg.in/matm/v1/gocov-html \ | ||
github.com/onsi/ginkgo/ginkgo \ | ||
github.com/onsi/gomega/... | ||
golang.org/x/tools/cmd/cover@latest \ | ||
github.com/axw/gocov/gocov@latest \ | ||
github.com/matm/gocov-html/cmd/gocov-html@latest \ | ||
github.com/onsi/ginkgo/[email protected] | ||
|
||
# The images can be pushed to any docker/image registeries | ||
# like docker hub, quay. The registries are specified in | ||
|
@@ -128,7 +127,7 @@ test: format | |
bootstrap: | ||
@for tool in $(EXTERNAL_TOOLS) ; do \ | ||
echo "+ Installing $$tool" ; \ | ||
cd && GO111MODULE=on go get $$tool; \ | ||
go install $$tool; \ | ||
done | ||
|
||
.PHONY: csi-driver | ||
|
@@ -154,7 +153,7 @@ deploy-images: | |
.PHONY: license-check | ||
license-check: | ||
@echo "--> Checking license header..." | ||
@licRes=$$(for file in $$(find . -type f -regex '.*\.sh\|.*\.go\|.*Docker.*\|.*\Makefile*' ! -path './vendor/*' ) ; do \ | ||
@licRes=$$(for file in $$(find . -type f -regex '.*\.sh\|.*\.go\|.*Docker.*\|.*\Makefile*' ) ; do \ | ||
awk 'NR<=5' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \ | ||
done); \ | ||
if [ -n "$${licRes}" ]; then \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,9 @@ | |
cd "$DIR" | ||
|
||
# Get the git commit | ||
if [ -f $GOPATH/src/github.com/openebs/cstor-csi/GITCOMMIT ]; | ||
Check warning on line 29 in buildscripts/build.sh GitHub Actions / lint
|
||
then | ||
GIT_COMMIT="$(cat $GOPATH/src/github.com/openebs/cstor-csi/GITCOMMIT)" | ||
Check warning on line 31 in buildscripts/build.sh GitHub Actions / lint
|
||
else | ||
GIT_COMMIT="$(git rev-parse HEAD)" | ||
fi | ||
|
@@ -72,8 +72,8 @@ | |
|
||
# Determine the arch/os combos we're building for | ||
UNAME=$(uname) | ||
ARCH=$(uname -m) | ||
Check warning on line 75 in buildscripts/build.sh GitHub Actions / lint
|
||
if [ "$UNAME" != "Linux" -a "$UNAME" != "Darwin" ] ; then | ||
Check warning on line 76 in buildscripts/build.sh GitHub Actions / lint
|
||
echo "Sorry, this OS is not supported yet." | ||
exit 1 | ||
fi | ||
|
@@ -98,8 +98,8 @@ | |
|
||
# Delete the old dir | ||
echo "==> Removing old directory..." | ||
rm -rf bin/${PNAME}/* | ||
Check warning on line 101 in buildscripts/build.sh GitHub Actions / lint
|
||
mkdir -p bin/${PNAME}/ | ||
Check warning on line 102 in buildscripts/build.sh GitHub Actions / lint
|
||
|
||
# If its dev mode, only build for ourself | ||
if [[ "${DEV}" ]]; then | ||
|
@@ -112,7 +112,7 @@ | |
|
||
GOOS="${XC_OS}" | ||
GOARCH="${XC_ARCH}" | ||
output_name="bin/${PNAME}/"$GOOS"_"$GOARCH"/"$CTLNAME | ||
Check warning on line 115 in buildscripts/build.sh GitHub Actions / lint
|
||
|
||
if [ $GOOS = "windows" ]; then | ||
output_name+='.exe' | ||
|
@@ -120,7 +120,8 @@ | |
env GOOS=$GOOS GOARCH=$GOARCH go build -ldflags \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"-X github.com/openebs/cstor-csi/pkg/version.GitCommit=${GIT_COMMIT} \ | ||
-X main.CtlName='${CTLNAME}' \ | ||
-X github.com/openebs/cstor-csi/pkg/version.Version=${VERSION}" \ | ||
-X github.com/openebs/cstor-csi/pkg/version.Version=${VERSION} \ | ||
-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn" \ | ||
-o $output_name\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
./cmd | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
set -e | ||
echo "" > coverage.txt | ||
|
||
for d in $(go list ./... | grep -v 'vendor\|pkg/apis\|pkg/client\|tests'); do | ||
for d in $(go list ./... | grep -v 'pkg/apis\|pkg/client\|tests'); do | ||
#TODO - Include -race while creating the coverage profile. | ||
go test -coverprofile=profile.out -covermode=atomic $d | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
if [ -f profile.out ]; then | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,16 +17,16 @@ | |
set -e | ||
|
||
# Create a temp dir and clean it up on exit | ||
TEMPDIR=`mktemp -d -t csi-test.XXX` | ||
Check warning on line 20 in buildscripts/test.sh GitHub Actions / lint
|
||
trap "rm -rf $TEMPDIR" EXIT HUP INT QUIT TERM | ||
Check warning on line 21 in buildscripts/test.sh GitHub Actions / lint
|
||
|
||
# Build the Maya binary for the tests | ||
echo "--> Building csi" | ||
go build -o $TEMPDIR/maya || exit 1 | ||
Check warning on line 25 in buildscripts/test.sh GitHub Actions / lint
|
||
|
||
# Run the tests | ||
echo "--> Running tests" | ||
GOBIN="`which go`" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
PATH=$TEMPDIR:$PATH \ | ||
$GOBIN test ${GOTEST_FLAGS:--cover -timeout=900s} $($GOBIN list ./... | grep -v 'vendor\|pkg/apis\|pkg/generated\|tests') | ||
$GOBIN test ${GOTEST_FLAGS:--cover -timeout=900s} $($GOBIN list ./... | grep -v 'pkg/apis\|pkg/generated\|tests') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,8 @@ set -o pipefail | |
# To support running this script from anywhere, we have to first cd into this directory | ||
# so we can install the tools. | ||
#cd $(dirname "${0}") | ||
cd vendor/k8s.io/code-generator/ | ||
go get -d k8s.io/[email protected] | ||
cd "$(go env GOPATH)/pkg/mod/k8s.io/[email protected]" | ||
go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen,conversion-gen,defaulter-gen} | ||
) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086