Skip to content

Commit

Permalink
build: fix empty platform in dagger
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sagi-Kazar <[email protected]>
  • Loading branch information
sagikazarmark committed Oct 7, 2024
1 parent 38a8a31 commit c75f2a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .dagger/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,14 @@ func (m *Binary) build(platform dagger.Platform, version string, pkg string) *da
}

return goModule().
With(func(m *dagger.Go) *dagger.Go {
if platform != "" {
m = m.WithPlatform(platform)
}

return m
}).
WithSource(m.Source).
WithPlatform(platform).
Build(dagger.GoWithSourceBuildOpts{
Pkg: pkg,
Trimpath: true,
Expand Down

0 comments on commit c75f2a2

Please sign in to comment.