2023-03-28 22:48:58 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
# SPDX-License-Identifier: BUSL-1.1
|
2023-03-28 22:48:58 +00:00
|
|
|
|
2022-03-25 18:27:28 +00:00
|
|
|
|
|
|
|
GOIMPORTS=~/go/bin/goimports
|
|
|
|
|
|
|
|
CHANGED=(EnterpriseMeta PartitionOrDefault IsDefaultPartition NamespaceOrDefault NewEnterpriseMetaWithPartition EqualPartitions)
|
|
|
|
|
|
|
|
DIRS=(agent command proto)
|
|
|
|
|
|
|
|
for dir in "${DIRS[@]}"
|
|
|
|
do
|
|
|
|
echo "CD to $dir"
|
|
|
|
pushd $dir
|
|
|
|
for s in "${CHANGED[@]}"
|
|
|
|
do
|
|
|
|
REWRITE='structs.'$s' -> acl.'$s
|
|
|
|
echo "REPL $REWRITE"
|
|
|
|
gofmt -w -r="$REWRITE" .
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
done
|
|
|
|
|
2022-03-29 01:45:12 +00:00
|
|
|
find . -name \*.go | xargs fgrep 'acl.' -l | xargs $GOIMPORTS -local "github.com/hashicorp/consul" -w
|
2022-03-25 18:27:28 +00:00
|
|
|
|
|
|
|
make --always-make proto
|
2022-03-29 02:31:46 +00:00
|
|
|
make go-mod-tidy
|