This project is a tutorial on using Bazel for building and managing Go projects. It provides step-by-step instructions on installing the necessary dependencies, such as Golang, Bazel, Bazelisk, and Gazelle. The README also includes commands for building and running the binary for different applications within the project. Additionally, it recommends installing Go Version Manager for managing different versions of Go. The tutorial aims to help developers understand and utilize Bazel effectively in their Go projects.
Youtube Video: https://youtu.be/o98xguY3nIA
brew install bazel
go get github.com/bazelbuild/bazelisk
go get github.com/bazelbuild/bazel-gazelle
bazel build //...
bazel run //apps/app-one
bazel run //apps/app-two
cd apps/app-one
go get <dependency>
cd ../../
bazel run //:gazelle-update-repo-one
bazel build //...
cd apps/swagger
yarn dev
If you find any issue, and it is taking too much time to resolve, run following command to clean all bazel generated files and caches
bazel clean --expunge
Install Go Version Manager
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)