-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Important for publish scenarios to not depend on daemon Signed-off-by: Micah Young <[email protected]>
- Loading branch information
Micah Young
committed
Oct 13, 2020
1 parent
ba9942f
commit 5bfd35d
Showing
6 changed files
with
126 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package buildpacks | ||
|
||
type Modifiable interface { | ||
SetOS(string) | ||
SetPublish() | ||
SetBuildpacks([]TestBuildpack) | ||
} | ||
type PackageModifier func(p Modifiable) | ||
|
||
func WithRequiredBuildpacks(buildpacks ...TestBuildpack) PackageModifier { | ||
return func(p Modifiable) { | ||
p.SetBuildpacks(buildpacks) | ||
} | ||
} | ||
|
||
func WithPublish() PackageModifier { | ||
return func(p Modifiable) { | ||
p.SetPublish() | ||
} | ||
} | ||
|
||
func WithOS(osVal string) PackageModifier { | ||
return func(p Modifiable) { | ||
p.SetOS(osVal) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters