Update pkg.info format

This commit is contained in:
2025-10-05 12:14:54 +03:00
parent 60b0f4489e
commit cdb044d751
2 changed files with 13 additions and 7 deletions
+1 -1
View File
@@ -130,8 +130,8 @@ func createDirectory() {
Downloads: []bpmutilsshared.PackageDownload{ Downloads: []bpmutilsshared.PackageDownload{
{ {
Url: "https://wwww.my-url.com/file.tar.gz", Url: "https://wwww.my-url.com/file.tar.gz",
ExtractTo: "${BPM_SOURCE}",
ExtractStripComponents: 1, ExtractStripComponents: 1,
ExtractToBPMSource: true,
Checksum: "replaceme", Checksum: "replaceme",
}, },
}, },
+12 -6
View File
@@ -32,14 +32,20 @@ type PackageInfo struct {
} }
type PackageDownload struct { type PackageDownload struct {
Url string `yaml:"url"` Url string `yaml:"url"`
Type string `yaml:"type,omitempty"` Type string `yaml:"type,omitempty"`
Filepath string `yaml:"filepath,omitempty,omitempty"`
// Archive options
NoExtract bool `yaml:"no_extract,omitempty"` NoExtract bool `yaml:"no_extract,omitempty"`
ExtractToBPMSource bool `yaml:"extract_to_bpm_source,omitempty"` ExtractTo string `yaml:"extract_to,omitempty"`
ExtractStripComponents int `yaml:"extract_strip_components,omitempty"` ExtractStripComponents int `yaml:"extract_strip_components,omitempty"`
GitBranch string `yaml:"git_branch,omitempty"`
Filepath string `yaml:"filepath,omitempty,omitempty"` // Git options
Checksum string `yaml:"checksum,omitempty"` CloneTo string `yaml:"clone_to,omitempty"`
GitBranch string `yaml:"git_branch,omitempty"`
Checksum string `yaml:"checksum,omitempty"`
} }
func ReadPackageInfo(data []byte) (*PackageInfo, error) { func ReadPackageInfo(data []byte) (*PackageInfo, error) {