@@ -36,6 +36,7 @@ func (b *Builder) Options(name string) (*api.Options, error) {
3636 // Define the handlers
3737 handlers := []optionsHandler {
3838 b .handleSHAOption ,
39+ b .handleSHAToTagOption ,
3940 b .handleMetadataOption ,
4041 b .handleRegexOption ,
4142 b .handlePinMajorOption ,
@@ -53,7 +54,9 @@ func (b *Builder) Options(name string) (*api.Options, error) {
5354
5455 // Ensure UseSHA is not used with other semver options
5556 if opts .UseSHA && setNonSha {
56- errs = append (errs , fmt .Sprintf ("cannot define %q with any semver options" , b .index (name , api .UseSHAAnnotationKey )))
57+ errs = append (errs ,
58+ fmt .Sprintf ("cannot define %q with any semver options" , b .index (name , api .UseSHAAnnotationKey )),
59+ )
5760 }
5861
5962 if len (errs ) > 0 {
@@ -68,6 +71,12 @@ func (b *Builder) handleSHAOption(name string, opts *api.Options, setNonSha *boo
6871 }
6972 return nil
7073}
74+ func (b * Builder ) handleSHAToTagOption (name string , opts * api.Options , setNonSha * bool , errs * []string ) error {
75+ if ResolveSHAToTags , ok := b .ans [b .index (name , api .ResolveSHAToTagsKey )]; ok && ResolveSHAToTags == "true" {
76+ opts .ResolveSHAToTags = true
77+ }
78+ return nil
79+ }
7180
7281func (b * Builder ) handleMetadataOption (name string , opts * api.Options , setNonSha * bool , errs * []string ) error {
7382 if useMetaData , ok := b .ans [b .index (name , api .UseMetaDataAnnotationKey )]; ok && useMetaData == "true" {
0 commit comments