mirror of
https://github.com/opentofu/opentofu.git
synced 2026-01-11 20:06:30 +00:00
go.mod: List our own tools in the "tools" directive
Some checks failed
Quick Checks / List files changed for pull request (push) Has been cancelled
build / Build for freebsd_386 (push) Has been cancelled
build / Build for linux_386 (push) Has been cancelled
build / Build for openbsd_386 (push) Has been cancelled
build / Build for windows_386 (push) Has been cancelled
build / Build for freebsd_amd64 (push) Has been cancelled
build / Build for linux_amd64 (push) Has been cancelled
build / Build for openbsd_amd64 (push) Has been cancelled
build / Build for solaris_amd64 (push) Has been cancelled
build / Build for windows_amd64 (push) Has been cancelled
build / Build for freebsd_arm (push) Has been cancelled
build / Build for linux_arm (push) Has been cancelled
build / Build for linux_arm64 (push) Has been cancelled
build / Build for darwin_amd64 (push) Has been cancelled
build / Build for darwin_arm64 (push) Has been cancelled
build / End-to-end Tests for linux_386 (push) Has been cancelled
build / End-to-end Tests for windows_386 (push) Has been cancelled
build / End-to-end Tests for darwin_amd64 (push) Has been cancelled
build / End-to-end Tests for linux_amd64 (push) Has been cancelled
build / End-to-end Tests for windows_amd64 (push) Has been cancelled
Website checks / List files changed for pull request (push) Has been cancelled
Quick Checks / License Checks (push) Has been cancelled
Quick Checks / Unit tests for linux_386 (push) Has been cancelled
Quick Checks / Race Tests (push) Has been cancelled
Website checks / Build (push) Has been cancelled
Website checks / Test Installation Instructions (push) Has been cancelled
Quick Checks / Unit tests for linux_amd64 (push) Has been cancelled
Quick Checks / Unit tests for windows_amd64 (push) Has been cancelled
Quick Checks / Unit tests for linux_arm (push) Has been cancelled
Quick Checks / Unit tests for darwin_arm64 (push) Has been cancelled
Quick Checks / Unit tests for linux_arm64 (push) Has been cancelled
Quick Checks / End-to-end Tests (push) Has been cancelled
Quick Checks / Code Consistency Checks (push) Has been cancelled
Some checks failed
Quick Checks / List files changed for pull request (push) Has been cancelled
build / Build for freebsd_386 (push) Has been cancelled
build / Build for linux_386 (push) Has been cancelled
build / Build for openbsd_386 (push) Has been cancelled
build / Build for windows_386 (push) Has been cancelled
build / Build for freebsd_amd64 (push) Has been cancelled
build / Build for linux_amd64 (push) Has been cancelled
build / Build for openbsd_amd64 (push) Has been cancelled
build / Build for solaris_amd64 (push) Has been cancelled
build / Build for windows_amd64 (push) Has been cancelled
build / Build for freebsd_arm (push) Has been cancelled
build / Build for linux_arm (push) Has been cancelled
build / Build for linux_arm64 (push) Has been cancelled
build / Build for darwin_amd64 (push) Has been cancelled
build / Build for darwin_arm64 (push) Has been cancelled
build / End-to-end Tests for linux_386 (push) Has been cancelled
build / End-to-end Tests for windows_386 (push) Has been cancelled
build / End-to-end Tests for darwin_amd64 (push) Has been cancelled
build / End-to-end Tests for linux_amd64 (push) Has been cancelled
build / End-to-end Tests for windows_amd64 (push) Has been cancelled
Website checks / List files changed for pull request (push) Has been cancelled
Quick Checks / License Checks (push) Has been cancelled
Quick Checks / Unit tests for linux_386 (push) Has been cancelled
Quick Checks / Race Tests (push) Has been cancelled
Website checks / Build (push) Has been cancelled
Website checks / Test Installation Instructions (push) Has been cancelled
Quick Checks / Unit tests for linux_amd64 (push) Has been cancelled
Quick Checks / Unit tests for windows_amd64 (push) Has been cancelled
Quick Checks / Unit tests for linux_arm (push) Has been cancelled
Quick Checks / Unit tests for darwin_arm64 (push) Has been cancelled
Quick Checks / Unit tests for linux_arm64 (push) Has been cancelled
Quick Checks / End-to-end Tests (push) Has been cancelled
Quick Checks / Code Consistency Checks (push) Has been cancelled
We previously adopted the new "tools" mechanism for the third-party tools we use for go:generate, etc. However, it's also acceptable to include tools from our own module in this list, which then makes it possible to run them using the same "go tool" shorthand. For example, it's now possible to run "go tool protobuf-compile" to rebuild the protocol buffers schemas, or "go tool tofu" as a shorthand way to compile and run OpenTofu CLI itself. It still remains possible to run these tools in the same ways they used to work. This is just a new way to get the same results through a more modern Go toolchain feature. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
parent
16f6b2d119
commit
e06e12f98a
3 changed files with 6 additions and 2 deletions
2
Makefile
2
Makefile
|
|
@ -44,7 +44,7 @@ generate:
|
|||
# versions of protoc and the protoc Go plugins.
|
||||
.PHONY: protobuf
|
||||
protobuf:
|
||||
go run ./tools/protobuf-compile .
|
||||
go tool protobuf-compile .
|
||||
|
||||
# Golangci-lint is installed first and then run twice to cover all platforms.
|
||||
.PHONY: golangci-lint
|
||||
|
|
|
|||
4
go.mod
4
go.mod
|
|
@ -324,6 +324,10 @@ replace github.com/hashicorp/hcl/v2 v2.20.1 => github.com/opentofu/hcl/v2 v2.20.
|
|||
tool (
|
||||
github.com/hashicorp/copywrite
|
||||
github.com/mitchellh/gox
|
||||
github.com/opentofu/opentofu/cmd/tofu
|
||||
github.com/opentofu/opentofu/tools/find-dep-upgrades
|
||||
github.com/opentofu/opentofu/tools/loggraphdiff
|
||||
github.com/opentofu/opentofu/tools/protobuf-compile
|
||||
go.uber.org/mock/mockgen
|
||||
golang.org/x/tools/cmd/stringer
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ var protocSteps = []protocStep{
|
|||
|
||||
func main() {
|
||||
if len(os.Args) != 2 {
|
||||
log.Fatal("Usage: go run github.com/opentofu/opentofu/tools/protobuf-compile <basedir>")
|
||||
log.Fatal("Usage: go tool protobuf-compile <basedir>")
|
||||
}
|
||||
baseDir := os.Args[1]
|
||||
workDir := filepath.Join(baseDir, "tools/protobuf-compile/.workdir")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue