Skip to content

Commit

Permalink
feat(dagger): support versioning (chainloop-dev#1451)
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Martinez <[email protected]>
  • Loading branch information
migmartri authored Oct 29, 2024
1 parent 1c88afb commit 0748db4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions extras/dagger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func (m *Chainloop) Init(
// name of an existing contract to attach it to the auto-created workflow
// +optional
contractName string,
// Version of the project to be used for the attestation
// +optional
projectVersion string,
) (*Attestation, error) {
att := &Attestation{
Token: token,
Expand All @@ -102,6 +105,12 @@ func (m *Chainloop) Init(
)
}

if projectVersion != "" {
args = append(args,
"--version", projectVersion,
)
}

info, err := att.
Container(0).
WithExec(args, execOpts).
Expand Down

0 comments on commit 0748db4

Please sign in to comment.