diff --git a/cmd/semantic-release/main.go b/cmd/semantic-release/main.go index 60cd0e16..5c0862fa 100644 --- a/cmd/semantic-release/main.go +++ b/cmd/semantic-release/main.go @@ -134,6 +134,13 @@ func cliHandler(cmd *cobra.Command, _ []string) { if conf.ProviderOpts["token"] == "" { conf.ProviderOpts["token"] = conf.Token } + + if conf.TagFormat != "" { + conf.ProviderOpts["tag_format"] = conf.TagFormat + } + + conf.ProviderOpts["tag_format"] = conf.TagFormat + err = prov.Init(conf.ProviderOpts) exitIfError(err) @@ -209,7 +216,9 @@ func cliHandler(cmd *cobra.Command, _ []string) { logger.Println("getting latest release...") matchRegex := "" match := strings.TrimSpace(conf.Match) - if match != "" { + if match != "" && conf.TagFormat != "" { + exitIfError(fmt.Errorf("match should not be specified with tag-format")) + } else if match != "" { logger.Printf("getting latest release matching %s...", match) matchRegex = "^" + match } diff --git a/pkg/config/config.go b/pkg/config/config.go index 03277474..1332a82e 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -101,6 +101,7 @@ func NewConfig(cmd *cobra.Command) (*Config, error) { PluginResolver: viper.GetString("pluginResolver"), PluginResolverEndpoint: viper.GetString("pluginResolverEndpoint"), PluginResolverDisableBatchPrefetch: viper.GetBool("pluginResolverDisableBatchPrefetch"), + TagFormat: viper.GetString("tagFormat"), } return conf, nil } @@ -147,6 +148,7 @@ func SetFlags(cmd *cobra.Command) { cmd.Flags().StringArray("hooks-opt", []string{}, "options that are passed to the hooks plugins") cmd.Flags().StringArrayP("update", "u", []string{}, "updates the version of a certain files") cmd.Flags().String("match", "", "only consider tags matching the given glob(7) pattern, excluding the \"refs/tags/\" prefix.") + cmd.Flags().String("tag-format", "", "Specify a Go template for formatting tags, must be a valid regex after template execution. {{.Version}} is automatically replaced with a semver compatible regex with a named capture group 'version'") cmd.Flags().String("maintained-version", "", "set the maintained version as base for new releases") cmd.Flags().BoolP("version-file", "f", false, "create a .version file with the new version") cmd.Flags().Bool("prerelease", false, "flags the release as a prerelease") @@ -180,6 +182,9 @@ func SetFlags(cmd *cobra.Command) { must(viper.BindEnv("pluginResolver", "SEMREL_PLUGIN_RESOLVER")) must(viper.BindPFlag("pluginResolverDisableBatchPrefetch", cmd.Flags().Lookup("plugin-resolver-disable-batch-prefetch"))) must(viper.BindPFlag("pluginResolverEndpoint", cmd.Flags().Lookup("plugin-resolver-endpoint"))) + + must(viper.BindPFlag("tagFormat", cmd.Flags().Lookup("tag-format"))) + must(viper.BindEnv("tagFormat", "TAG_FORMAT")) } func InitConfig(cmd *cobra.Command) error { diff --git a/pkg/config/config.pb.go b/pkg/config/config.pb.go index 8e635ba9..ab7e6d7d 100644 --- a/pkg/config/config.pb.go +++ b/pkg/config/config.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.4 +// protoc-gen-go v1.36.5 +// protoc v3.21.12 // source: pkg/config/config.proto package config @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -22,51 +23,49 @@ const ( // Config is a complete set of app configuration type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - ProviderPlugin string `protobuf:"bytes,2,opt,name=provider_plugin,json=providerPlugin,proto3" json:"provider_plugin,omitempty"` - ProviderOpts map[string]string `protobuf:"bytes,3,rep,name=provider_opts,json=providerOpts,proto3" json:"provider_opts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - CommitAnalyzerPlugin string `protobuf:"bytes,4,opt,name=commit_analyzer_plugin,json=commitAnalyzerPlugin,proto3" json:"commit_analyzer_plugin,omitempty"` - CommitAnalyzerOpts map[string]string `protobuf:"bytes,5,rep,name=commit_analyzer_opts,json=commitAnalyzerOpts,proto3" json:"commit_analyzer_opts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - CiConditionPlugin string `protobuf:"bytes,6,opt,name=ci_condition_plugin,json=ciConditionPlugin,proto3" json:"ci_condition_plugin,omitempty"` - CiConditionOpts map[string]string `protobuf:"bytes,7,rep,name=ci_condition_opts,json=ciConditionOpts,proto3" json:"ci_condition_opts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ChangelogGeneratorPlugin string `protobuf:"bytes,8,opt,name=changelog_generator_plugin,json=changelogGeneratorPlugin,proto3" json:"changelog_generator_plugin,omitempty"` - ChangelogGeneratorOpts map[string]string `protobuf:"bytes,9,rep,name=changelog_generator_opts,json=changelogGeneratorOpts,proto3" json:"changelog_generator_opts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Changelog string `protobuf:"bytes,10,opt,name=changelog,proto3" json:"changelog,omitempty"` - FilesUpdaterPlugins []string `protobuf:"bytes,11,rep,name=files_updater_plugins,json=filesUpdaterPlugins,proto3" json:"files_updater_plugins,omitempty"` - FilesUpdaterOpts map[string]string `protobuf:"bytes,12,rep,name=files_updater_opts,json=filesUpdaterOpts,proto3" json:"files_updater_opts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - HooksPlugins []string `protobuf:"bytes,13,rep,name=hooks_plugins,json=hooksPlugins,proto3" json:"hooks_plugins,omitempty"` - HooksOpts map[string]string `protobuf:"bytes,14,rep,name=hooks_opts,json=hooksOpts,proto3" json:"hooks_opts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - UpdateFiles []string `protobuf:"bytes,15,rep,name=update_files,json=updateFiles,proto3" json:"update_files,omitempty"` - Match string `protobuf:"bytes,16,opt,name=match,proto3" json:"match,omitempty"` - VersionFile bool `protobuf:"varint,17,opt,name=version_file,json=versionFile,proto3" json:"version_file,omitempty"` - Prerelease bool `protobuf:"varint,18,opt,name=prerelease,proto3" json:"prerelease,omitempty"` - Ghr bool `protobuf:"varint,19,opt,name=ghr,proto3" json:"ghr,omitempty"` - NoCi bool `protobuf:"varint,20,opt,name=no_ci,json=noCi,proto3" json:"no_ci,omitempty"` - Dry bool `protobuf:"varint,21,opt,name=dry,proto3" json:"dry,omitempty"` - AllowInitialDevelopmentVersions bool `protobuf:"varint,22,opt,name=allow_initial_development_versions,json=allowInitialDevelopmentVersions,proto3" json:"allow_initial_development_versions,omitempty"` - AllowNoChanges bool `protobuf:"varint,23,opt,name=allow_no_changes,json=allowNoChanges,proto3" json:"allow_no_changes,omitempty"` - ForceBumpPatchVersion bool `protobuf:"varint,24,opt,name=force_bump_patch_version,json=forceBumpPatchVersion,proto3" json:"force_bump_patch_version,omitempty"` - MaintainedVersion string `protobuf:"bytes,25,opt,name=maintained_version,json=maintainedVersion,proto3" json:"maintained_version,omitempty"` - PrependChangelog bool `protobuf:"varint,26,opt,name=prepend_changelog,json=prependChangelog,proto3" json:"prepend_changelog,omitempty"` - DownloadPlugins bool `protobuf:"varint,27,opt,name=download_plugins,json=downloadPlugins,proto3" json:"download_plugins,omitempty"` - ShowProgress bool `protobuf:"varint,28,opt,name=show_progress,json=showProgress,proto3" json:"show_progress,omitempty"` - AllowMaintainedVersionOnDefaultBranch bool `protobuf:"varint,29,opt,name=allow_maintained_version_on_default_branch,json=allowMaintainedVersionOnDefaultBranch,proto3" json:"allow_maintained_version_on_default_branch,omitempty"` - PluginResolver string `protobuf:"bytes,30,opt,name=plugin_resolver,json=pluginResolver,proto3" json:"plugin_resolver,omitempty"` - PluginResolverEndpoint string `protobuf:"bytes,31,opt,name=plugin_resolver_endpoint,json=pluginResolverEndpoint,proto3" json:"plugin_resolver_endpoint,omitempty"` - PluginResolverDisableBatchPrefetch bool `protobuf:"varint,32,opt,name=plugin_resolver_disable_batch_prefetch,json=pluginResolverDisableBatchPrefetch,proto3" json:"plugin_resolver_disable_batch_prefetch,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + ProviderPlugin string `protobuf:"bytes,2,opt,name=provider_plugin,json=providerPlugin,proto3" json:"provider_plugin,omitempty"` + ProviderOpts map[string]string `protobuf:"bytes,3,rep,name=provider_opts,json=providerOpts,proto3" json:"provider_opts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CommitAnalyzerPlugin string `protobuf:"bytes,4,opt,name=commit_analyzer_plugin,json=commitAnalyzerPlugin,proto3" json:"commit_analyzer_plugin,omitempty"` + CommitAnalyzerOpts map[string]string `protobuf:"bytes,5,rep,name=commit_analyzer_opts,json=commitAnalyzerOpts,proto3" json:"commit_analyzer_opts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CiConditionPlugin string `protobuf:"bytes,6,opt,name=ci_condition_plugin,json=ciConditionPlugin,proto3" json:"ci_condition_plugin,omitempty"` + CiConditionOpts map[string]string `protobuf:"bytes,7,rep,name=ci_condition_opts,json=ciConditionOpts,proto3" json:"ci_condition_opts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ChangelogGeneratorPlugin string `protobuf:"bytes,8,opt,name=changelog_generator_plugin,json=changelogGeneratorPlugin,proto3" json:"changelog_generator_plugin,omitempty"` + ChangelogGeneratorOpts map[string]string `protobuf:"bytes,9,rep,name=changelog_generator_opts,json=changelogGeneratorOpts,proto3" json:"changelog_generator_opts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Changelog string `protobuf:"bytes,10,opt,name=changelog,proto3" json:"changelog,omitempty"` + FilesUpdaterPlugins []string `protobuf:"bytes,11,rep,name=files_updater_plugins,json=filesUpdaterPlugins,proto3" json:"files_updater_plugins,omitempty"` + FilesUpdaterOpts map[string]string `protobuf:"bytes,12,rep,name=files_updater_opts,json=filesUpdaterOpts,proto3" json:"files_updater_opts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + HooksPlugins []string `protobuf:"bytes,13,rep,name=hooks_plugins,json=hooksPlugins,proto3" json:"hooks_plugins,omitempty"` + HooksOpts map[string]string `protobuf:"bytes,14,rep,name=hooks_opts,json=hooksOpts,proto3" json:"hooks_opts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + UpdateFiles []string `protobuf:"bytes,15,rep,name=update_files,json=updateFiles,proto3" json:"update_files,omitempty"` + Match string `protobuf:"bytes,16,opt,name=match,proto3" json:"match,omitempty"` + VersionFile bool `protobuf:"varint,17,opt,name=version_file,json=versionFile,proto3" json:"version_file,omitempty"` + Prerelease bool `protobuf:"varint,18,opt,name=prerelease,proto3" json:"prerelease,omitempty"` + Ghr bool `protobuf:"varint,19,opt,name=ghr,proto3" json:"ghr,omitempty"` + NoCi bool `protobuf:"varint,20,opt,name=no_ci,json=noCi,proto3" json:"no_ci,omitempty"` + Dry bool `protobuf:"varint,21,opt,name=dry,proto3" json:"dry,omitempty"` + AllowInitialDevelopmentVersions bool `protobuf:"varint,22,opt,name=allow_initial_development_versions,json=allowInitialDevelopmentVersions,proto3" json:"allow_initial_development_versions,omitempty"` + AllowNoChanges bool `protobuf:"varint,23,opt,name=allow_no_changes,json=allowNoChanges,proto3" json:"allow_no_changes,omitempty"` + ForceBumpPatchVersion bool `protobuf:"varint,24,opt,name=force_bump_patch_version,json=forceBumpPatchVersion,proto3" json:"force_bump_patch_version,omitempty"` + MaintainedVersion string `protobuf:"bytes,25,opt,name=maintained_version,json=maintainedVersion,proto3" json:"maintained_version,omitempty"` + PrependChangelog bool `protobuf:"varint,26,opt,name=prepend_changelog,json=prependChangelog,proto3" json:"prepend_changelog,omitempty"` + DownloadPlugins bool `protobuf:"varint,27,opt,name=download_plugins,json=downloadPlugins,proto3" json:"download_plugins,omitempty"` + ShowProgress bool `protobuf:"varint,28,opt,name=show_progress,json=showProgress,proto3" json:"show_progress,omitempty"` + AllowMaintainedVersionOnDefaultBranch bool `protobuf:"varint,29,opt,name=allow_maintained_version_on_default_branch,json=allowMaintainedVersionOnDefaultBranch,proto3" json:"allow_maintained_version_on_default_branch,omitempty"` + PluginResolver string `protobuf:"bytes,30,opt,name=plugin_resolver,json=pluginResolver,proto3" json:"plugin_resolver,omitempty"` + PluginResolverEndpoint string `protobuf:"bytes,31,opt,name=plugin_resolver_endpoint,json=pluginResolverEndpoint,proto3" json:"plugin_resolver_endpoint,omitempty"` + PluginResolverDisableBatchPrefetch bool `protobuf:"varint,32,opt,name=plugin_resolver_disable_batch_prefetch,json=pluginResolverDisableBatchPrefetch,proto3" json:"plugin_resolver_disable_batch_prefetch,omitempty"` + TagFormat string `protobuf:"bytes,33,opt,name=tag_format,json=tagFormat,proto3" json:"tag_format,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Config) Reset() { *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_config_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pkg_config_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Config) String() string { @@ -77,7 +76,7 @@ func (*Config) ProtoMessage() {} func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_pkg_config_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,11 +315,18 @@ func (x *Config) GetPluginResolverDisableBatchPrefetch() bool { return false } +func (x *Config) GetTagFormat() string { + if x != nil { + return x.TagFormat + } + return "" +} + var File_pkg_config_config_proto protoreflect.FileDescriptor -var file_pkg_config_config_proto_rawDesc = []byte{ +var file_pkg_config_config_proto_rawDesc = string([]byte{ 0x0a, 0x17, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x0f, 0x0a, 0x06, 0x43, 0x6f, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x0f, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, @@ -421,53 +427,55 @@ var file_pkg_config_config_proto_rawDesc = []byte{ 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, - 0x68, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4f, 0x70, 0x74, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x6e, 0x61, 0x6c, - 0x79, 0x7a, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x43, 0x69, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x49, 0x0a, - 0x1b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, + 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x45, 0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x6e, 0x61, 0x6c, 0x79, + 0x7a, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, - 0x0e, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x3f, 0x5a, 0x3d, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x73, 0x65, 0x6d, - 0x61, 0x6e, 0x74, 0x69, 0x63, 0x2d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x65, - 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x2d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x76, - 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x43, 0x69, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x49, 0x0a, 0x1b, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, + 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x4f, 0x70, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x2d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x2d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x32, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +}) var ( file_pkg_config_config_proto_rawDescOnce sync.Once - file_pkg_config_config_proto_rawDescData = file_pkg_config_config_proto_rawDesc + file_pkg_config_config_proto_rawDescData []byte ) func file_pkg_config_config_proto_rawDescGZIP() []byte { file_pkg_config_config_proto_rawDescOnce.Do(func() { - file_pkg_config_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_config_config_proto_rawDescData) + file_pkg_config_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pkg_config_config_proto_rawDesc), len(file_pkg_config_config_proto_rawDesc))) }) return file_pkg_config_config_proto_rawDescData } var file_pkg_config_config_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_pkg_config_config_proto_goTypes = []interface{}{ +var file_pkg_config_config_proto_goTypes = []any{ (*Config)(nil), // 0: Config nil, // 1: Config.ProviderOptsEntry nil, // 2: Config.CommitAnalyzerOptsEntry @@ -495,25 +503,11 @@ func file_pkg_config_config_proto_init() { if File_pkg_config_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_pkg_config_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pkg_config_config_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_pkg_config_config_proto_rawDesc), len(file_pkg_config_config_proto_rawDesc)), NumEnums: 0, NumMessages: 7, NumExtensions: 0, @@ -524,7 +518,6 @@ func file_pkg_config_config_proto_init() { MessageInfos: file_pkg_config_config_proto_msgTypes, }.Build() File_pkg_config_config_proto = out.File - file_pkg_config_config_proto_rawDesc = nil file_pkg_config_config_proto_goTypes = nil file_pkg_config_config_proto_depIdxs = nil } diff --git a/pkg/config/config.proto b/pkg/config/config.proto index 61cbeba8..40081b6d 100644 --- a/pkg/config/config.proto +++ b/pkg/config/config.proto @@ -35,4 +35,5 @@ message Config { string plugin_resolver = 30; string plugin_resolver_endpoint = 31; bool plugin_resolver_disable_batch_prefetch = 32; + string tag_format = 33; }