Validate CI module tags before delivery preparation
This commit is contained in:
@@ -291,6 +291,15 @@ func runCIDelivery(ctx context.Context, invocation cli.Invocation, stdout, stder
|
||||
fmt.Fprintf(stderr, "profile module selection: %v\n", err)
|
||||
return 2
|
||||
}
|
||||
identity, err := releaseidentity.FromCommitted(ctx, invocation.Repository, settings.ModuleDir, invocation.Version, invocation.Commit)
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "resolve CI release identity: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
if invocation.ExpectedTag != identity.Tag {
|
||||
fmt.Fprintf(stderr, "expected delivery tag %q does not match selected module tag %q\n", invocation.ExpectedTag, identity.Tag)
|
||||
return 1
|
||||
}
|
||||
destination, status := deliveryDestination(invocation.Repository, settings, stderr)
|
||||
if status != 0 {
|
||||
return status
|
||||
|
||||
Reference in New Issue
Block a user