Factor Go source file listing into a script

pull/321/head
Eugene Kim 6 years ago
parent 887fdbc1a5
commit fd45de0fd1
  1. 7
      scripts/list_harmony_go_files.sh
  2. 7
      scripts/travis_checker.sh

@ -0,0 +1,7 @@
#!/bin/sh
exec git ls-files '*.go' | grep -v \
-e '^vendor/' \
-e '\.pb\.go$' \
-e '/mock_stream\.go' \
-e '/host_mock\.go' \
-e '/gen_[^/]*\.go'

@ -27,12 +27,7 @@ trap 'case "${tmpdir}" in ?*) rm -rf "${tmpdir}";; esac' EXIT
tmpdir=$(mktemp -d)
go_files="${tmpdir}/go_files.txt"
git ls-files '*.go' | grep -v \
-e '^vendor/' \
-e '\.pb\.go$' \
-e '/mock_stream\.go' \
-e '/host_mock\.go' \
-e '/gen_[^/]*\.go' > "${go_files}"
"${progdir}/list_harmony_go_files.sh" > "${go_files}"
# Print dirname of each relative pathname from stdin (one per line).
dirnames() {

Loading…
Cancel
Save