fix: fix releaser #23
2 changed files with 21 additions and 16 deletions
|
|
@ -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,17 +89,23 @@ func (p *Provider) CreateArchitectureFiles() error {
|
||||||
ShaSumsUrl: shasumsUrl,
|
ShaSumsUrl: shasumsUrl,
|
||||||
ShaSumsSignatureUrl: shasumsSigUrl,
|
ShaSumsSignatureUrl: shasumsSigUrl,
|
||||||
ShaSum: sum.Sum,
|
ShaSum: sum.Sum,
|
||||||
SigningKeys: []SigningKey{
|
SigningKeys: []SigningKey{},
|
||||||
{
|
|
||||||
KeyId: p.GpgFingerprint,
|
|
||||||
AsciiArmor: gpgAsciiPub,
|
|
||||||
TrustSignature: "",
|
|
||||||
Source: "",
|
|
||||||
SourceUrl: "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.SigningKeys = append(
|
||||||
|
a.SigningKeys,
|
||||||
|
SigningKey{
|
||||||
|
GpgPublicKeys: []GpgPublicKey{
|
||||||
|
{
|
||||||
|
KeyId: p.GpgFingerprint,
|
||||||
|
AsciiArmor: gpgAsciiPub,
|
||||||
|
TrustSignature: "",
|
||||||
|
Source: "",
|
||||||
|
SourceUrl: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
)
|
||||||
// var architectureTemplate = []byte(fmt.Sprintf(`
|
// var architectureTemplate = []byte(fmt.Sprintf(`
|
||||||
//{
|
//{
|
||||||
// "protocols": [
|
// "protocols": [
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue