fix: fix releaser #23
2 changed files with 21 additions and 16 deletions
|
|
@ -22,6 +22,10 @@ type Architecture struct {
|
|||
}
|
||||
|
||||
type SigningKey struct {
|
||||
GpgPublicKeys []GpgPublicKey `json:"gpg_public_keys"`
|
||||
}
|
||||
|
||||
type GpgPublicKey struct {
|
||||
KeyId string `json:"key_id"`
|
||||
AsciiArmor string `json:"ascii_armor"`
|
||||
TrustSignature string `json:"trust_signature"`
|
||||
|
|
@ -85,17 +89,23 @@ func (p *Provider) CreateArchitectureFiles() error {
|
|||
ShaSumsUrl: shasumsUrl,
|
||||
ShaSumsSignatureUrl: shasumsSigUrl,
|
||||
ShaSum: sum.Sum,
|
||||
SigningKeys: []SigningKey{
|
||||
{
|
||||
KeyId: p.GpgFingerprint,
|
||||
AsciiArmor: gpgAsciiPub,
|
||||
TrustSignature: "",
|
||||
Source: "",
|
||||
SourceUrl: "",
|
||||
},
|
||||
},
|
||||
SigningKeys: []SigningKey{},
|
||||
}
|
||||
|
||||
a.SigningKeys = append(
|
||||
a.SigningKeys,
|
||||
SigningKey{
|
||||
GpgPublicKeys: []GpgPublicKey{
|
||||
{
|
||||
KeyId: p.GpgFingerprint,
|
||||
AsciiArmor: gpgAsciiPub,
|
||||
TrustSignature: "",
|
||||
Source: "",
|
||||
SourceUrl: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
// var architectureTemplate = []byte(fmt.Sprintf(`
|
||||
//{
|
||||
// "protocols": [
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@ type Data struct {
|
|||
}
|
||||
|
||||
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)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error encoding data: %w", err)
|
||||
|
|
@ -51,7 +45,8 @@ func (d *Data) AddVersion(v Version) error {
|
|||
newVersions = append(newVersions, ver)
|
||||
}
|
||||
}
|
||||
d.Versions = append(d.Versions, v)
|
||||
newVersions = append(newVersions, v)
|
||||
d.Versions = newVersions
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue