ggd

command
v0.0.0-...-edd1bdd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

README

ggd - GoGitDiff

ggd is a tool to compute Go packages affected by changes between two Git revisions. It does so by identifying the Go packages changed between two Git revisions, and computing all other packages which depend upon them. It's primary goal is to help speed up CI jobs by figuring out the packages affected by git changes, and transitively looking through the Go Imports. It takes inspiration from gta, and the work done at DigitalOcean.

NB: debug mode (-d) allows users to inspect the tool's decision making process.

Installation
$ git checkout github.com/m3db/build-tools
$ cd build-tools/utilities/ggd
$ glide install -v
$ go install .
Sample Usage
ggd: command line tool to find packages affected by git changes. Examples:
# Assuming CWD is in a git repository directory present in the GOPATH.

# (1) List all the golang packages affected by changes between master and HEAD
ggd

# (2) List all the golang packages affected by changes between branchA and HEAD
ggd branchA

# (3) List all the golang packages affected by between changes between branchA and branchB
ggd branchA..branchB

# (4) Run tests for all the golang packages affected by between master, and head
go test $(ggd)

# (5) List all the golang packages affected by between master and head, and build tags 'integration'
ggd -t integration

# (6) The same as (5), but include debug output (sent to STDERR)
ggd -t integration -d

# (7) The same as (6), but include debug output (sent to STDERR), and
# save the generated DAG in changes.png for visualization
ggd -t integration -d -o change.dot
dot -Tpng change.png changes.dot

Documentation

Overview

Copyright (c) 2018 Uber Technologies, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL