Skip to content

Commit

Permalink
Renaming use_cache to pull_image
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffDownie committed Feb 20, 2017
1 parent 5d96ed0 commit fcb93cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ _testmain.go

coverage.out
drone-docker

# IDE/Editor related files
**.swp
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ func main() {
EnvVar: "PLUGIN_SQUASH",
},
cli.BoolTFlag{
Name: "cache",
Usage: "don't attempt to re-build layers of the image that already exist",
EnvVar: "PLUGIN_USE_CACHE",
Name: "pull-image",
Usage: "force pull base image at build time",
EnvVar: "PLUGIN_PULL_IMAGE",
},
cli.BoolFlag{
Name: "compress",
Expand Down Expand Up @@ -177,7 +177,7 @@ func run(c *cli.Context) error {
Tags: c.StringSlice("tags"),
Args: c.StringSlice("args"),
Squash: c.Bool("squash"),
Cache: c.Bool("cache"),
Pull: c.BoolT("pull-image"),
Compress: c.Bool("compress"),
Repo: c.String("repo"),
},
Expand Down
6 changes: 2 additions & 4 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type (
Tags []string // Docker build tags
Args []string // Docker build args
Squash bool // Docker build squash
Cache bool // Docker build without pulling
Pull bool // Docker build pull
Compress bool // Docker build compress
Repo string // Docker build repository
}
Expand Down Expand Up @@ -200,9 +200,7 @@ func commandBuild(build Build) *exec.Cmd {
if build.Compress {
args = append(args, "--compress")
}
if build.Cache {
args = append(args, "--pull=false")
} else {
if build.Pull {
args = append(args, "--pull=true")
}
for _, arg := range build.Args {
Expand Down

0 comments on commit fcb93cf

Please # to comment.