Skip to content

Commit

Permalink
Merge pull request #1631 from openmeterio/fix-dagger
Browse files Browse the repository at this point in the history
build: fix empty platform in dagger
  • Loading branch information
sagikazarmark authored Oct 7, 2024
2 parents 38a8a31 + c75f2a2 commit cf8c453
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 cf8c453

Please sign in to comment.