mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
Script to report on api usage.
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
# Usage:
|
||||
# ./hack/showDeps ./plugin
|
||||
# ./hack/showDeps ./kustomize
|
||||
|
||||
function showDeps {
|
||||
echo "==== begin $1 =================================="
|
||||
find $1 -name "*.go" |\
|
||||
xargs grep \"sigs.k8s.io/kustomize/api/ |\
|
||||
sed 's|:\s"| |' |\
|
||||
sed 's|"$||' |\
|
||||
awk '{ printf "%60s %s\n", $2, $1 }' |\
|
||||
sed 's|sigs.k8s.io/kustomize/api/||' |\
|
||||
sort | uniq
|
||||
echo "==== end $1 =================================="
|
||||
}
|
||||
|
||||
showDeps $1
|
||||
20
hack/whatApi.sh
Executable file
20
hack/whatApi.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
# Report on use of API module.
|
||||
#
|
||||
# Usage:
|
||||
# ./hack/whatApi.sh plugin
|
||||
# ./hack/whatApi.sh kustomize
|
||||
|
||||
function whatApi {
|
||||
echo "==== begin $1 =================================="
|
||||
find $1 -name "*.go" |\
|
||||
xargs grep \"sigs.k8s.io/kustomize/api/ |\
|
||||
sed 's|:\s"|: dummy "|' |\
|
||||
sed 's|:\s\w\+\s"| |' |\
|
||||
sed 's|"$||' |\
|
||||
awk '{ printf "%60s %s\n", $2, $1 }' |\
|
||||
sed 's|sigs.k8s.io/kustomize/api/||' |\
|
||||
sort | uniq
|
||||
echo "==== end $1 =================================="
|
||||
}
|
||||
|
||||
whatApi $1
|
||||
Reference in New Issue
Block a user