-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #581 from nr-swilloughby/master
Release v3.19.2
- Loading branch information
Showing
19 changed files
with
218 additions
and
83 deletions.
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
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
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
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,62 @@ | ||
# Copyright 2020 New Relic Corporation. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -x | ||
set -e | ||
|
||
# inputs | ||
# 1: repo pin; example: github.com/rewrelic/[email protected] | ||
pin_go_dependency() { | ||
if [[ ! -z "$1" ]]; then | ||
echo "Pinning: $1" | ||
repo=$(echo "$1" | cut -d '@' -f1) | ||
pinTo=$(echo "$1" | cut -d '@' -f2) | ||
set +e | ||
go get -u "$repo" # this go get will fail to build | ||
set -e | ||
cd "$GOPATH"/src/"$repo" | ||
git checkout "$pinTo" | ||
cd - | ||
fi | ||
} | ||
|
||
verify_go_fmt() { | ||
needsFMT=$(gofmt -d .) | ||
if [ ! -z "$needsFMT" ]; then | ||
echo "$needsFMT" | ||
echo "Please format your code with \"gofmt .\"" | ||
# exit 1 | ||
fi | ||
} | ||
|
||
pwd=$(pwd) | ||
version=$(go version) | ||
echo $version | ||
|
||
tmp=$(echo $version | cut -d 'o' -f4) | ||
shortVersion=${tmp%.*} | ||
|
||
IFS="," | ||
for dir in $DIRS; do | ||
cd "$pwd/$dir" | ||
|
||
# replace go-agent with local pull | ||
go mod edit -replace github.com/newrelic/go-agent/v3="$pwd"/v3 | ||
|
||
# manage dependencies | ||
go mod tidy -go=$shortVersion -compat=$shortVersion | ||
pin_go_dependency "$PIN" | ||
|
||
# run tests | ||
go test -race -benchtime=1ms -bench=. ./... | ||
go vet ./... | ||
verify_go_fmt | ||
|
||
# Test again against the latest version of the dependencies to ensure that | ||
# our instrumentation is up to date. TODO: Perhaps it is possible to | ||
# upgrade all go.mod dependencies to latest master with a go command. | ||
if [ -n "$EXTRATESTING" ]; then | ||
eval "$EXTRATESTING" | ||
go test -race -benchtime=1ms -bench=. ./... | ||
fi | ||
done |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
module github.com/newrelic/go-agent/v3 | ||
|
||
go 1.7 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/golang/protobuf v1.4.3 | ||
google.golang.org/grpc v1.39.0 | ||
github.com/golang/protobuf v1.5.2 | ||
google.golang.org/grpc v1.49.0 | ||
) |
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
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
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
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
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
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
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
Oops, something went wrong.