Skip to content

Commit

Permalink
rename flag for builder cache size
Browse files Browse the repository at this point in the history
  • Loading branch information
billyb2 committed Aug 28, 2024
1 parent 60b788a commit 15e068c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/build/imgsrc/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,14 @@ func (r *Resolver) BuildImage(ctx context.Context, streams *iostreams.IOStreams,
return nil, fmt.Errorf("invalid depot-scope value. must be 'org' or 'app'")
}

builderSize := flag.GetInt(ctx, "depot-builder-size")
buildCacheSize := flag.GetInt(ctx, "depot-build-cache-size")
region := flag.GetString(ctx, "depot-builder-region")
update := flag.GetBool(ctx, "depot-builder-update")

if r.dockerFactory.mode.UseNixpacks() {
strategies = append(strategies, &nixpacksBuilder{})
} else if r.dockerFactory.mode.UseDepot() {
strategies = append(strategies, &DepotBuilder{Scope: builderScope, Size: builderSize, Region: region, Update: update})
strategies = append(strategies, &DepotBuilder{Scope: builderScope, Size: buildCacheSize, Region: region, Update: update})
} else {
strategies = []imageBuilder{
&buildpacksBuilder{},
Expand Down
2 changes: 1 addition & 1 deletion internal/command/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var CommonFlags = flag.Set{
flag.NoCache(),
flag.Depot(),
flag.DepotScope(),
flag.DepotBuilderSize(),
flag.DepotBuildCacheSize(),
flag.DepotBuilderRegion(),
flag.DepotBuilderUpdate(),
flag.Nixpacks(),
Expand Down
4 changes: 2 additions & 2 deletions internal/flag/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,9 @@ func DepotScope() String {
}
}

func DepotBuilderSize() Int {
func DepotBuildCacheSize() Int {
return Int{
Name: "depot-builder-size",
Name: "depot-build-cache-size",
Description: "The size of the Depot builder's cache in GB",
Default: 50,
}
Expand Down

0 comments on commit 15e068c

Please sign in to comment.