Skip to content

Commit ec7fda5

Browse files
committed
feat: update config
1 parent 8ba9470 commit ec7fda5

File tree

1 file changed

+81
-15
lines changed

1 file changed

+81
-15
lines changed

pkg/config/config.go

Lines changed: 81 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ type AUR struct {
210210
PrivateKey string `yaml:"private_key,omitempty" json:"private_key,omitempty"`
211211
Goamd64 string `yaml:"goamd64,omitempty" json:"goamd64,omitempty"`
212212
Directory string `yaml:"directory,omitempty" json:"directory,omitempty"`
213+
214+
// v2.8+
215+
Disable string `yaml:"disable,omitempty" json:"disable,omitempty" jsonschema:"oneof_type=string;boolean"`
216+
Install string `yaml:"install,omitempty" json:"install,omitempty"`
213217
}
214218

215219
type AURSource struct {
@@ -240,6 +244,31 @@ type AURSource struct {
240244
PrivateKey string `yaml:"private_key,omitempty" json:"private_key,omitempty"`
241245
Goamd64 string `yaml:"goamd64,omitempty" json:"goamd64,omitempty"`
242246
Directory string `yaml:"directory,omitempty" json:"directory,omitempty"`
247+
248+
// v2.8+
249+
Disable string `yaml:"disable,omitempty" json:"disable,omitempty" jsonschema:"oneof_type=string;boolean"`
250+
Install string `yaml:"install,omitempty" json:"install,omitempty"`
251+
}
252+
253+
// NPM publishes to npm.js.
254+
// Since v2.8.
255+
type NPM struct {
256+
ID string `yaml:"id,omitempty" json:"id,omitempty"`
257+
IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"`
258+
Name string `yaml:"name,omitempty" json:"name,omitempty"`
259+
Description string `yaml:"description,omitempty" json:"description,omitempty"`
260+
Homepage string `yaml:"homepage,omitempty" json:"homepage,omitempty"`
261+
Keywords []string `yaml:"keywords,omitempty" json:"keywords,omitempty"`
262+
License string `yaml:"license,omitempty" json:"license,omitempty"`
263+
Author string `yaml:"author,omitempty" json:"author,omitempty"`
264+
Repository string `yaml:"repository,omitempty" json:"repository,omitempty"`
265+
Bugs string `yaml:"bugs,omitempty" json:"bugs,omitempty"`
266+
ExtraFiles []ExtraFile `yaml:"files,omitempty" json:"files,omitempty"`
267+
TemplatedExtraFiles []TemplatedExtraFile `yaml:"templated_files,omitempty" json:"templated_files,omitempty"`
268+
Access string `yaml:"access,omitempty" json:"access,omitempty" jsonschema:"enum=,enum=public,enum=restricted"`
269+
Format string `yaml:"format,omitempty" json:"format,omitempty" jsonschema:"enum=tar,enum=tgz,enum=tar.gz,enum=zip,enum=binary"`
270+
If string `yaml:"if,omitempty" json:"if,omitempty"`
271+
Disable string `yaml:"disable,omitempty" json:"disable,omitempty" jsonschema:"oneof_type=string;boolean"`
243272
}
244273

245274
// Homebrew contains the brew section.
@@ -336,7 +365,7 @@ type Winget struct {
336365
Goamd64 string `yaml:"goamd64,omitempty" json:"goamd64,omitempty"`
337366
SkipUpload string `yaml:"skip_upload,omitempty" json:"skip_upload,omitempty" jsonschema:"oneof_type=string;boolean"`
338367
URLTemplate string `yaml:"url_template,omitempty" json:"url_template,omitempty"`
339-
ShortDescription string `yaml:"short_description" json:"short_description"`
368+
ShortDescription string `yaml:"short_description,omitempty" json:"short_description,omitempty"`
340369
Description string `yaml:"description,omitempty" json:"description,omitempty"`
341370
Homepage string `yaml:"homepage,omitempty" json:"homepage,omitempty"`
342371
License string `yaml:"license,omitempty" json:"license,omitempty"`
@@ -396,6 +425,9 @@ type Ko struct {
396425
Bare bool `yaml:"bare,omitempty" json:"bare,omitempty"`
397426
PreserveImportPaths bool `yaml:"preserve_import_paths,omitempty" json:"preserve_import_paths,omitempty"`
398427
BaseImportPaths bool `yaml:"base_import_paths,omitempty" json:"base_import_paths,omitempty"`
428+
429+
// v2.7+
430+
Disable string `yaml:"disable,omitempty" json:"disable,omitempty" jsonschema:"oneof_type=string;boolean"`
399431
}
400432

401433
// Scoop contains the scoop.sh section.
@@ -680,7 +712,7 @@ type UPX struct {
680712
// Archive config used for the archive.
681713
type Archive struct {
682714
ID string `yaml:"id,omitempty" json:"id,omitempty"`
683-
Builds []string `yaml:"builds,omitempty" json:"builds,omitempty"`
715+
IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"`
684716
BuildsInfo FileInfo `yaml:"builds_info,omitempty" json:"builds_info,omitempty"`
685717
NameTemplate string `yaml:"name_template,omitempty" json:"name_template,omitempty"`
686718
Formats StringArray `yaml:"formats,omitempty" json:"formats,omitempty" jsonschema:"enum=tar,enum=tgz,enum=tar.gz,enum=zip,enum=gz,enum=tar.xz,enum=txz,enum=binary,default=tar.gz"`
@@ -697,6 +729,9 @@ type Archive struct {
697729

698730
// Deprecated: use [Formats] instead.
699731
Format string `yaml:"format,omitempty" json:"format,omitempty" jsonschema:"enum=tar,enum=tgz,enum=tar.gz,enum=zip,enum=gz,enum=tar.xz,enum=txz,enum=binary,default=tar.gz"`
732+
733+
// Deprecated: use [IDs] instead.
734+
Builds []string `yaml:"builds,omitempty" json:"builds,omitempty"`
700735
}
701736

702737
type ReleaseNotesMode string
@@ -780,8 +815,7 @@ type NFPM struct {
780815
Overrides map[string]NFPMOverridables `yaml:"overrides,omitempty" json:"overrides,omitempty"`
781816

782817
ID string `yaml:"id,omitempty" json:"id,omitempty"`
783-
Builds []string `yaml:"builds,omitempty" json:"builds,omitempty"`
784-
If string `yaml:"if,omitempty" json:"if,omitempty"`
818+
IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"`
785819
Formats []string `yaml:"formats,omitempty" json:"formats,omitempty" jsonschema:"enum=apk,enum=deb,enum=rpm,enum=termux.deb,enum=archlinux,enum=ipk"`
786820
Section string `yaml:"section,omitempty" json:"section,omitempty"`
787821
Priority string `yaml:"priority,omitempty" json:"priority,omitempty"`
@@ -797,6 +831,12 @@ type NFPM struct {
797831
Meta bool `yaml:"meta,omitempty" json:"meta,omitempty"` // make package without binaries - only deps
798832

799833
ParsedMTime time.Time `yaml:"-" json:"-"`
834+
835+
// Pro-only
836+
If string `yaml:"if,omitempty" json:"if,omitempty"`
837+
838+
// Deprecated: use [IDs] instead.
839+
Builds []string `yaml:"builds,omitempty" json:"builds,omitempty"`
800840
}
801841

802842
type Libdirs struct {
@@ -997,7 +1037,27 @@ type Sign struct {
9971037
}
9981038

9991039
type Notarize struct {
1000-
MacOS []MacOSSignNotarize `yaml:"macos" json:"macos"`
1040+
MacOS []MacOSSignNotarize `yaml:"macos,omitempty" json:"macos,omitempty"`
1041+
MacOSNative []MacOSSignNotarizeNative `yaml:"macos_native,omitempty" json:"macos_native,omitempty"`
1042+
}
1043+
1044+
type MacOSSignNotarizeNative struct {
1045+
IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"`
1046+
Enabled string `yaml:"enabled,omitempty" json:"enabled,omitempty" jsonschema:"oneof_type=string;boolean"`
1047+
Sign MacOSSignNative `yaml:"sign" json:"sign"`
1048+
Notarize MacOSNotarizeNative `yaml:"notarize" json:"notarize"`
1049+
}
1050+
1051+
type MacOSNotarizeNative struct {
1052+
ProfileName string `yaml:"profile_name" json:"profile_name"`
1053+
Wait bool `yaml:"wait,omitempty" json:"wait,omitempty"`
1054+
}
1055+
1056+
type MacOSSignNative struct {
1057+
Identity string `yaml:"identity" json:"identity"`
1058+
Keychain string `yaml:"keychain,omitempty" json:"keychain,omitempty"`
1059+
Options []string `yaml:"options,omitempty" json:"options,omitempty"`
1060+
Entitlements string `yaml:"entitlements,omitempty" json:"entitlements,omitempty"`
10011061
}
10021062

10031063
type MacOSSignNotarize struct {
@@ -1011,7 +1071,7 @@ type MacOSNotarize struct {
10111071
IssuerID string `yaml:"issuer_id" json:"issuer_id"`
10121072
Key string `yaml:"key" json:"key"`
10131073
KeyID string `yaml:"key_id" json:"key_id"`
1014-
Timeout time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
1074+
Timeout time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty" jsonschema:"type=string"`
10151075
Wait bool `yaml:"wait,omitempty" json:"wait,omitempty"`
10161076
}
10171077

@@ -1071,7 +1131,7 @@ type Snapcraft struct {
10711131
NameTemplate string `yaml:"name_template,omitempty" json:"name_template,omitempty"`
10721132
Publish bool `yaml:"publish,omitempty" json:"publish,omitempty"`
10731133
ID string `yaml:"id,omitempty" json:"id,omitempty"`
1074-
Builds []string `yaml:"builds,omitempty" json:"builds,omitempty"`
1134+
IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"`
10751135
Name string `yaml:"name,omitempty" json:"name,omitempty"`
10761136
Title string `yaml:"title,omitempty" json:"title,omitempty"`
10771137
Summary string `yaml:"summary" json:"summary"`
@@ -1093,6 +1153,9 @@ type Snapcraft struct {
10931153

10941154
// pro only
10951155
TemplatedFiles []SnapcraftExtraFiles `yaml:"templated_extra_files,omitempty" json:"templated_extra_files,omitempty"`
1156+
1157+
// Deprecated: use IDs.
1158+
Builds []string `yaml:"builds,omitempty" json:"builds,omitempty"`
10961159
}
10971160

10981161
// SnapcraftExtraFiles config.
@@ -1202,7 +1265,7 @@ type ChangelogAI struct {
12021265

12031266
// ChangelogGroup holds the grouping criteria for the changelog.
12041267
type ChangelogGroup struct {
1205-
Title string `yaml:"title,omitempty" json:"title,omitempty"`
1268+
Title string `yaml:"title" json:"title"`
12061269
Regexp string `yaml:"regexp,omitempty" json:"regexp,omitempty"`
12071270
Order int `yaml:"order,omitempty" json:"order,omitempty"`
12081271

@@ -1380,6 +1443,7 @@ type Project struct {
13801443
Release Release `yaml:"release,omitempty" json:"release,omitempty"`
13811444
Milestones []Milestone `yaml:"milestones,omitempty" json:"milestones,omitempty"`
13821445
Brews []Homebrew `yaml:"brews,omitempty" json:"brews,omitempty"`
1446+
NPMs []NPM `yaml:"npms,omitempty" json:"npms,omitempty"`
13831447
Nix []Nix `yaml:"nix,omitempty" json:"nix,omitempty"`
13841448
Winget []Winget `yaml:"winget,omitempty" json:"winget,omitempty"`
13851449
MSI []MSI `yaml:"msi,omitempty" json:"msi,omitempty"`
@@ -1530,13 +1594,15 @@ type Fury struct {
15301594
}
15311595

15321596
type Cloudsmith struct {
1533-
IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"`
1534-
Organization string `yaml:"organization" json:"organization"`
1535-
Repository string `yaml:"repository" json:"repository"`
1536-
Formats []string `yaml:"formats,omitempty" json:"formats,omitempty"`
1537-
SecretName string `yaml:"secret_name,omitempty" json:"secret_name,omitempty"`
1538-
Disable string `yaml:"disable,omitempty" json:"disable,omitempty"`
1539-
Distributions map[string]string `yaml:"distributions" json:"distributions"`
1597+
IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"`
1598+
Organization string `yaml:"organization" json:"organization"`
1599+
Repository string `yaml:"repository" json:"repository"`
1600+
Formats []string `yaml:"formats,omitempty" json:"formats,omitempty"`
1601+
SecretName string `yaml:"secret_name,omitempty" json:"secret_name,omitempty"`
1602+
Disable string `yaml:"disable,omitempty" json:"disable,omitempty"`
1603+
1604+
// stringarray v2.8+
1605+
Distributions map[string]StringArray `yaml:"distributions" json:"distributions"`
15401606

15411607
// v2.7
15421608
Component string `yaml:"component,omitempty" json:"component,omitempty"`

0 commit comments

Comments
 (0)