#!/bin/sh
# Copyright 2023 Uber Technologies, Inc.
# Licensed under the Apache License, Version 2.0
set -xeu
cd "$(git rev-parse --show-toplevel)"
echo "--- go mod tidy"
bazel run @go_sdk//:bin/go -- mod tidy "$@"
echo "--- gazelle update-repos"
exec gazelle update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories -prune