Skip to content

Commit a7c5e80

Browse files
committed
fix: update config
1 parent 72c8133 commit a7c5e80

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

pkg/config/config.go

+14-5
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ func (a *HomebrewDependency) UnmarshalYAML(unmarshal func(interface{}) error) er
179179

180180
a.Name = dep.Name
181181
a.Type = dep.Type
182+
a.Version = dep.Version
183+
a.OS = dep.OS
182184

183185
return nil
184186
}
@@ -459,10 +461,10 @@ type Build struct {
459461
Hooks BuildHookConfig `yaml:"hooks,omitempty" json:"hooks,omitempty"`
460462
Builder string `yaml:"builder,omitempty" json:"builder,omitempty"`
461463
ModTimestamp string `yaml:"mod_timestamp,omitempty" json:"mod_timestamp,omitempty"`
462-
Skip bool `yaml:"skip,omitempty" json:"skip,omitempty"`
464+
Skip string `yaml:"skip,omitempty" json:"skip,omitempty" jsonschema:"oneof_type=string;boolean"`
463465
GoBinary string `yaml:"gobinary,omitempty" json:"gobinary,omitempty"`
464466
Command string `yaml:"command,omitempty" json:"command,omitempty"`
465-
NoUniqueDistDir bool `yaml:"no_unique_dist_dir,omitempty" json:"no_unique_dist_dir,omitempty"`
467+
NoUniqueDistDir string `yaml:"no_unique_dist_dir,omitempty" json:"no_unique_dist_dir,omitempty" jsonschema:"oneof_type=string;boolean"`
466468
NoMainCheck bool `yaml:"no_main_check,omitempty" json:"no_main_check,omitempty"`
467469
UnproxiedMain string `yaml:"-" json:"-"` // used by gomod.proxy
468470
UnproxiedDir string `yaml:"-" json:"-"` // used by gomod.proxy
@@ -707,7 +709,7 @@ type NFPM struct {
707709

708710
ID string `yaml:"id,omitempty" json:"id,omitempty"`
709711
Builds []string `yaml:"builds,omitempty" json:"builds,omitempty"`
710-
Formats []string `yaml:"formats,omitempty" json:"formats,omitempty" jsonschema:"enum=apk,enum=deb,enum=rpm,enum=termux.deb,enum=archlinux"`
712+
Formats []string `yaml:"formats,omitempty" json:"formats,omitempty" jsonschema:"enum=apk,enum=deb,enum=rpm,enum=termux.deb,enum=archlinux,enum=ipk"`
711713
Section string `yaml:"section,omitempty" json:"section,omitempty"`
712714
Priority string `yaml:"priority,omitempty" json:"priority,omitempty"`
713715
Vendor string `yaml:"vendor,omitempty" json:"vendor,omitempty"`
@@ -900,6 +902,7 @@ type Sign struct {
900902
Signature string `yaml:"signature,omitempty" json:"signature,omitempty"`
901903
Artifacts string `yaml:"artifacts,omitempty" json:"artifacts,omitempty" jsonschema:"enum=all,enum=manifests,enum=images,enum=checksum,enum=source,enum=package,enum=archive,enum=binary,enum=sbom,enum=installer,enum=diskimage"`
902904
IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"`
905+
If string `yaml:"if,omitempty" json:"if,omitempty"`
903906
Stdin *string `yaml:"stdin,omitempty" json:"stdin,omitempty"`
904907
StdinFile string `yaml:"stdin_file,omitempty" json:"stdin_file,omitempty"`
905908
Env []string `yaml:"env,omitempty" json:"env,omitempty"`
@@ -989,7 +992,7 @@ type Snapcraft struct {
989992
License string `yaml:"license,omitempty" json:"license,omitempty"`
990993
Grade string `yaml:"grade,omitempty" json:"grade,omitempty" jsonschema:"enum=stable,enum=devel,default=stable"`
991994
ChannelTemplates []string `yaml:"channel_templates,omitempty" json:"channel_templates,omitempty"`
992-
Confinement string `yaml:"confinement,omitempty" json:"confinement,omitempty" jsonschema:"enum=strict,enum=classic,enum=devmode,classic=strict"`
995+
Confinement string `yaml:"confinement,omitempty" json:"confinement,omitempty" jsonschema:"enum=strict,enum=classic,enum=devmode,default=strict"`
993996
Assumes []string `yaml:"assumes,omitempty" json:"assumes,omitempty"`
994997
Layout map[string]SnapcraftLayoutMetadata `yaml:"layout,omitempty" json:"layout,omitempty"`
995998
Apps map[string]SnapcraftAppMetadata `yaml:"apps,omitempty" json:"apps,omitempty"`
@@ -1012,11 +1015,15 @@ type SnapcraftExtraFiles struct {
10121015

10131016
// Snapshot config.
10141017
type Snapshot struct {
1015-
NameTemplate string `yaml:"name_template,omitempty" json:"name_template,omitempty"`
1018+
// Deprecated: use VersionTemplate.
1019+
NameTemplate string `yaml:"name_template,omitempty" json:"name_template,omitempty"`
1020+
VersionTemplate string `yaml:"version_template,omitempty" json:"version_template,omitempty"`
10161021
}
10171022

10181023
// Nightly config.
10191024
type Nightly struct { // pro only
1025+
VersionTemplate string `yaml:"version_template,omitempty" json:"version_template,omitempty"`
1026+
// Deprecated: use VersionTemplate.
10201027
NameTemplate string `yaml:"name_template,omitempty" json:"name_template,omitempty"`
10211028
TagName string `yaml:"tag_name,omitempty" json:"tag_name,omitempty"`
10221029
PublishRelease bool `yaml:"publish_release,omitempty" json:"publish_release,omitempty"`
@@ -1184,6 +1191,7 @@ type Blob struct {
11841191

11851192
// pro-only
11861193
TemplatedExtraFiles []TemplatedExtraFile `yaml:"templated_extra_files,omitempty" json:"templated_extra_files,omitempty"`
1194+
If string `yaml:"if,omitempty" json:"if,omitempty"`
11871195
}
11881196

11891197
// Upload configuration.
@@ -1274,6 +1282,7 @@ type Project struct {
12741282
Signs []Sign `yaml:"signs,omitempty" json:"signs,omitempty"`
12751283
Notarize Notarize `yaml:"notarize,omitempty" json:"notarize,omitempty"`
12761284
DockerSigns []Sign `yaml:"docker_signs,omitempty" json:"docker_signs,omitempty"`
1285+
BinarySigns []Sign `yaml:"binary_signs,omitempty" json:"binary_signs,omitempty"`
12771286
EnvFiles EnvFiles `yaml:"env_files,omitempty" json:"env_files,omitempty"`
12781287
Before Before `yaml:"before,omitempty" json:"before,omitempty"`
12791288
After After `yaml:"after,omitempty" json:"after,omitempty"`

0 commit comments

Comments
 (0)