From cdb044d7514723e4877b9adf128629d5061deb5e Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 5 Oct 2025 12:14:54 +0300 Subject: [PATCH] Update pkg.info format --- src/bpm-setup/main.go | 2 +- src/bpm-utils-shared/package.go | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/bpm-setup/main.go b/src/bpm-setup/main.go index 1759a9c..ba3d9b6 100644 --- a/src/bpm-setup/main.go +++ b/src/bpm-setup/main.go @@ -130,8 +130,8 @@ func createDirectory() { Downloads: []bpmutilsshared.PackageDownload{ { Url: "https://wwww.my-url.com/file.tar.gz", + ExtractTo: "${BPM_SOURCE}", ExtractStripComponents: 1, - ExtractToBPMSource: true, Checksum: "replaceme", }, }, diff --git a/src/bpm-utils-shared/package.go b/src/bpm-utils-shared/package.go index 4a6b7ae..f28cc21 100644 --- a/src/bpm-utils-shared/package.go +++ b/src/bpm-utils-shared/package.go @@ -32,14 +32,20 @@ type PackageInfo struct { } type PackageDownload struct { - Url string `yaml:"url"` - Type string `yaml:"type,omitempty"` + Url string `yaml:"url"` + Type string `yaml:"type,omitempty"` + Filepath string `yaml:"filepath,omitempty,omitempty"` + + // Archive options 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"` - GitBranch string `yaml:"git_branch,omitempty"` - Filepath string `yaml:"filepath,omitempty,omitempty"` - Checksum string `yaml:"checksum,omitempty"` + + // Git options + CloneTo string `yaml:"clone_to,omitempty"` + GitBranch string `yaml:"git_branch,omitempty"` + + Checksum string `yaml:"checksum,omitempty"` } func ReadPackageInfo(data []byte) (*PackageInfo, error) {