sourcegraph/dev/generate.sh
TJ DeVries e2c2857120
lsif typed syntax highlighter v0.1 (#30016)
* (syntax-highlighter): tree-sitter,lsif-typed

* lsif_typed -> lsiftyped

* doc updates

* update docker images to match .tool-versions

* fixup: Remove submodules when running backcompat tests
2022-02-23 11:44:17 -05:00

22 lines
734 B
Bash
Executable File

#!/usr/bin/env bash
set -e
cd "$(dirname "${BASH_SOURCE[0]}")/.." # cd to repo root dir
# We'll exclude generating the CLI reference documentation by default due to the
# relatively high cost of fetching and building src-cli.
go list ./... | grep -v 'doc/cli/references' | xargs go generate -x
# Ignore the submodules in docker-images syntax-highlighter.
#
# Disable shellcheck for this line because we actually want them to be space separated
# (goimports doesn't accept passing args by stdin)
#
# shellcheck disable=SC2046
GOBIN="$PWD/.bin" go install golang.org/x/tools/cmd/goimports && \
./.bin/goimports -w $(
comm -12 <(git ls-files | sort) <(find . -type f -name '*.go' -printf "%P\n" | sort)
)
go mod tidy