fix: fix releaser #23

Merged
marcel.henselin merged 2 commits from fix/publisher_fix into alpha 2026-01-30 14:28:48 +00:00
2 changed files with 21 additions and 16 deletions

View file

@ -22,6 +22,10 @@ type Architecture struct {
} }
type SigningKey struct { type SigningKey struct {
GpgPublicKeys []GpgPublicKey `json:"gpg_public_keys"`
}
type GpgPublicKey struct {
KeyId string `json:"key_id"` KeyId string `json:"key_id"`
AsciiArmor string `json:"ascii_armor"` AsciiArmor string `json:"ascii_armor"`
TrustSignature string `json:"trust_signature"` TrustSignature string `json:"trust_signature"`
@ -85,7 +89,13 @@ func (p *Provider) CreateArchitectureFiles() error {
ShaSumsUrl: shasumsUrl, ShaSumsUrl: shasumsUrl,
ShaSumsSignatureUrl: shasumsSigUrl, ShaSumsSignatureUrl: shasumsSigUrl,
ShaSum: sum.Sum, ShaSum: sum.Sum,
SigningKeys: []SigningKey{ SigningKeys: []SigningKey{},
}
a.SigningKeys = append(
a.SigningKeys,
SigningKey{
GpgPublicKeys: []GpgPublicKey{
{ {
KeyId: p.GpgFingerprint, KeyId: p.GpgFingerprint,
AsciiArmor: gpgAsciiPub, AsciiArmor: gpgAsciiPub,
@ -94,8 +104,8 @@ func (p *Provider) CreateArchitectureFiles() error {
SourceUrl: "", SourceUrl: "",
}, },
}, },
} },
)
// var architectureTemplate = []byte(fmt.Sprintf(` // var architectureTemplate = []byte(fmt.Sprintf(`
//{ //{
// "protocols": [ // "protocols": [

View file

@ -26,12 +26,6 @@ type Data struct {
} }
func (d *Data) WriteToFile(filePath string) error { func (d *Data) WriteToFile(filePath string) error {
//file, err := os.OpenFile(filePath, os.O_CREATE, os.ModePerm)
//if err != nil {
// return fmt.Errorf("error creating file: %w", err)
//}
//defer file.Close()
//
jsonString, err := json.Marshal(d) jsonString, err := json.Marshal(d)
if err != nil { if err != nil {
return fmt.Errorf("error encoding data: %w", err) return fmt.Errorf("error encoding data: %w", err)
@ -51,7 +45,8 @@ func (d *Data) AddVersion(v Version) error {
newVersions = append(newVersions, ver) newVersions = append(newVersions, ver)
} }
} }
d.Versions = append(d.Versions, v) newVersions = append(newVersions, v)
d.Versions = newVersions
return nil return nil
} }