Skip to content

Latest commit

 

History

History
34 lines (32 loc) · 684 Bytes

README.md

File metadata and controls

34 lines (32 loc) · 684 Bytes

Overview

Bazel with Go for Monorepos.

Instructions

  1. Install Bazel
brew install bazel
  1. Create a WORKSPACE file in the route of the project
  2. Create a BUILD file in the route
  3. Run Gazelle
bazel run //:gazelle  
  1. Update project dependencies (if needed)
bazel run //:gazelle --update-repos -from_file=go.mod
  1. Might need to chmod the shell file
sudo chmod 755 status.sh
  1. Run with stamp
bazel build --stamp --workspace_status_command=$(pwd)/status.sh //... 
  1. Run the binaries
bazel-bin/cmd/a/a_/a 
bazel-bin/cmd/b/b_/b
bazel-bin/cmd/c/c_/c
  1. Update a single binary and recheck the stamps