forked from tesserai/grpc-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixup.sh
More file actions
executable file
·31 lines (26 loc) · 712 Bytes
/
fixup.sh
File metadata and controls
executable file
·31 lines (26 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Script that checks the code for errors.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
function print_real_go_files {
grep --files-without-match 'DO NOT EDIT!' $(find . -iname '*.go')
}
function generate_markdown {
echo "Generating markdown"
oldpwd=$(pwd)
for i in $(find . -iname 'doc.go'); do
dir=${i%/*}
echo "$dir"
cd ${dir}
${GOPATH}/bin/godocdown -heading=Title -o DOC.md
ln -s DOC.md README.md 2> /dev/null # can fail
cd ${oldpwd}
done;
}
function goimports_all {
echo "Running goimports"
goimports -l -w $(print_real_go_files)
return $?
}
generate_markdown
goimports_all
echo "returning $?"