mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-08 21:05:45 +00:00
27 lines
586 B
Bash
Executable File
27 lines
586 B
Bash
Executable File
#!/bin/bash
|
|
CurrentPath=$(cd $(dirname ${BASH_SOURCE[0]}); pwd)
|
|
gofmtFile=gofmt_results.diff
|
|
pushd ${CurrentPath}/../../
|
|
find . -type f -name "*.go" | \
|
|
grep -v 'vendor'|grep -v 'depends'|grep -v ./sdk/graphql/client/ | \
|
|
xargs gofumpt -l -d > ${gofmtFile}
|
|
cat ${gofmtFile}
|
|
if [ "$(cat ${gofmtFile}|wc -l)" -gt 0 ]; then
|
|
popd
|
|
exit 1;
|
|
fi
|
|
rm -f ${gofmtFile}
|
|
popd
|
|
|
|
export PATH=$PATH:/go/bin
|
|
|
|
for subdir in proto blockcache storage cli lcnode
|
|
do
|
|
pushd ${CurrentPath}/../../${subdir}
|
|
go generate ./...
|
|
if [[ $? -ne 0 ]]; then
|
|
exit 1
|
|
fi
|
|
popd
|
|
done
|