Bazel Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 27: Line 27:
Write a shell script that invokes the target. In this way, the target is not run from bazel - the bazel lock is released and the executable is connected to the terminal's stdin.
Write a shell script that invokes the target. In this way, the target is not run from bazel - the bazel lock is released and the executable is connected to the terminal's stdin.
==<tt>version</tt>==
==<tt>version</tt>==
==<tt>query</tt>==
<font size=-2>
bazel query <options> <query-expression>
</font>
Executes a query language expression over a specified subgraph of the build dependency graph.
===?===
===?===


=Scenarios=
=Scenarios=

Revision as of 20:12, 5 June 2024

External

Internal

Commands

build

bazel build //...

clean

fetch

info

bazel info

run

Runs the specified target. It inherits all options form build.

bazel run --script_path=/Users/ovidiu/bin/something //a/something

Runs the specified target.

--script-path

Write a shell script that invokes the target. In this way, the target is not run from bazel - the bazel lock is released and the executable is connected to the terminal's stdin.

version

query

bazel query <options> <query-expression>

Executes a query language expression over a specified subgraph of the build dependency graph.

?

?

Scenarios

Clean Cache

bazel run @cached_local_xcode//:clear_cache; bazel clean --expunge; bazel shutdown; go clean -cache