Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions cmd/gb/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ For more about where packages and binaries are installed, run 'gb help project'.
Run: func(ctx *gb.Context, args []string) error {
// TODO(dfc) run should take a *gb.Context not a *gb.Project
ctx.Force = F
ctx.ForceAll = F && A
ctx.Install = !FF

pkgs, err := resolveRootPackages(ctx, args...)
Expand Down
11 changes: 6 additions & 5 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ type Context struct {

Statistics

Force bool // force rebuild of packages
Install bool // copy packages into $PROJECT/pkg
Verbose bool // verbose output
Nope bool // command specfic flag, under test it skips the execute action.
race bool // race detector requested
Force bool // force rebuild of packages
ForceAll bool // force rebuild of all packages, including the standard library
Install bool // copy packages into $PROJECT/pkg
Verbose bool // verbose output
Nope bool // command specfic flag, under test it skips the execute action.
race bool // race detector requested

gcflags []string // flags passed to the compiler
ldflags []string // flags passed to the linker
Expand Down
4 changes: 4 additions & 0 deletions install.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func isStale(pkg *Package) bool {
return false
}

if pkg.ForceAll {
return true
}

if !pkg.Standard && pkg.Force {
return true
}
Expand Down