Skip to content

Commit

Permalink
PR review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
xnyo committed Aug 8, 2023
1 parent 1bbe825 commit aa9ffae
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/update-backend-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,17 @@ fi

SDK_TARGET="${1:-latest}"

# Keep track of base directory
base=$(pwd)

# Find go.mod files (backend plugins)
files=$(find examples -type f -name "go.mod")

# Iterate over each file and run `go get` to upgrade the grafana-plugin-sdk-go dependency
for file in $files; do
echo "Upgrading grafana-plugin-sdk-go to $SDK_TARGET in $file"

cd $(dirname "$file")
pushd $(dirname "$file") || exit 1
go get -u "github.com/grafana/grafana-plugin-sdk-go@$SDK_TARGET"
go mod tidy

# Return to base directory
cd "$base"
popd || exit 1
done

0 comments on commit aa9ffae

Please sign in to comment.