mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
apidiff support internal go modules
The kubernetes repository contains some internal golang modules that are not part of the golang global workspace. Because apidiff is currently run from the root of the repository, it does not work against this internal modules. Instead of executing apidiff from the root we can just cd into the passed path of the module to avoid this limitation.
This commit is contained in:
parent
95d71c464a
commit
e6fccc36d8
@ -156,7 +156,12 @@ run () {
|
||||
out="$1"
|
||||
mkdir -p "$out"
|
||||
for d in "${targets[@]}"; do
|
||||
apidiff -m -w "${out}/$(output_name "${d}")" "${d}"
|
||||
# cd to the path for modules that are intree but not part of the go workspace
|
||||
# per example staging/src/k8s.io/code-generator/examples
|
||||
(
|
||||
cd "${d}"
|
||||
apidiff -m -w "${out}/$(output_name "${d}")" .
|
||||
)
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user