22 lines
603 B
Bash
Executable File
22 lines
603 B
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
# Separate core packages from those that depend on the whole library being built.
|
|
core=$(go list ./... | grep -v examples)
|
|
post=$(go list ./... | grep examples)
|
|
|
|
# Install avogen (for bootstrapping).
|
|
go install ./internal/cmd/avogen
|
|
|
|
# Attempt to delete generated files, to prove we can recreate them.
|
|
grep -REl 'Code generated.*DO NOT EDIT\.$' . | xargs rm -v
|
|
|
|
# Generate once.
|
|
go generate -v -x ${core}
|
|
|
|
# If the instruction database has changed, may need to repeat.
|
|
go install ./internal/cmd/avogen
|
|
go generate -v -x ${core}
|
|
|
|
# Generate dependent packages.
|
|
go generate -v -x ${post}
|