Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,16 @@ Open `bazel-diff-example.sh` to see how this is implemented. This is purely an e

`bazel-diff` Command
~~~
Usage: bazel-diff [-htV] -b=<bazelPath> [-fh=<finalHashesJSONPath>]
[-o=<outputPath>] [-sh=<startingHashesJSONPath>]
Usage: bazel-diff [-htV] -b=<bazelPath> [-co=<bazelCommandOptions>]
[-fh=<finalHashesJSONPath>] [-o=<outputPath>]
[-sh=<startingHashesJSONPath>] [-so=<bazelStartupOptions>]
-w=<workspacePath> [COMMAND]
Writes to a file the impacted targets between two Bazel graph JSON files
-b, --bazelPath=<bazelPath>
Path to Bazel binary
-co, --bazelCommandOptions=<bazelCommandOptions>
Additional space separated Bazel command options used when
invoking Bazel
-fh, --finalHashes=<finalHashesJSONPath>
The path to the JSON file of target hashes for the final
revision. Run 'generate-hashes' to get this value.
Expand All @@ -74,6 +78,9 @@ Writes to a file the impacted targets between two Bazel graph JSON files
-sh, --startingHashes=<startingHashesJSONPath>
The path to the JSON file of target hashes for the initial
revision. Run 'generate-hashes' to get this value.
-so, --bazelStartupOptions=<bazelStartupOptions>
Additional space separated Bazel client startup options used
when invoking Bazel
-t, --tests Return only targets of kind 'test')
-V, --version Print version information and exit.
-w, --workspacePath=<workspacePath>
Expand All @@ -82,37 +89,54 @@ Writes to a file the impacted targets between two Bazel graph JSON files

`modified-filepaths` Command
~~~
Usage: bazel-diff modified-filepaths [-hV] -b=<bazelPath> -w=<workspacePath>
<startingGitRevision> <endingGitRevision>
<outputPath>
Usage: bazel-diff modified-filepaths [-hV] -b=<bazelPath>
[-co=<bazelCommandOptions>]
[-so=<bazelStartupOptions>]
-w=<workspacePath> <startingGitRevision>
<endingGitRevision> <outputPath>
Writes to the file the modified filepaths between two revisions.
<startingGitRevision> The starting Git revision, e.g. "HEAD^"
<endingGitRevision> The final Git revision, e.g. "HEAD"
<outputPath> Path that the list of modified files will be
written to
-b, --bazelPath=<bazelPath>
Path to Bazel binary
-co, --bazelCommandOptions=<bazelCommandOptions>
Additional space separated Bazel command options
used when invoking Bazel
-h, --help Show this help message and exit.
-so, --bazelStartupOptions=<bazelStartupOptions>
Additional space separated Bazel client startup
options used when invoking Bazel
-V, --version Print version information and exit.
-w, --workspacePath=<workspacePath>
Path to Bazel workspace directory.
~~~

`generate-hashes` Command
~~~
Usage: bazel-diff generate-hashes [-hV] -b=<bazelPath> [-m=<modifiedFilepaths>]
Usage: bazel-diff generate-hashes [-hV] -b=<bazelPath>
[-co=<bazelCommandOptions>]
[-m=<modifiedFilepaths>]
[-so=<bazelStartupOptions>]
-w=<workspacePath> <outputPath>
Writes to a file the SHA256 hashes for each Bazel Target in the provided
workspace.
<outputPath> The filepath to write the resulting JSON of dictionary
target => SHA-256 values
-b, --bazelPath=<bazelPath>
Path to Bazel binary
-co, --bazelCommandOptions=<bazelCommandOptions>
Additional space separated Bazel command options used when
invoking Bazel
-h, --help Show this help message and exit.
-m, --modifiedFilepaths=<modifiedFilepaths>
The path to a file containing the list of modified
filepaths in the workspace, you can use the
'modified-filepaths' command to get this list
-so, --bazelStartupOptions=<bazelStartupOptions>
Additional space separated Bazel client startup options
used when invoking Bazel
-V, --version Print version information and exit.
-w, --workspacePath=<workspacePath>
Path to Bazel workspace directory.
Expand Down