Merge branch 'alpha' into fix/publisher_fix
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 10s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 29m18s
CI Workflow / CI (pull_request) Failing after 32m6s
CI Workflow / Code coverage report (pull_request) Has been skipped

This commit is contained in:
Marcel_Henselin 2026-01-30 14:28:32 +00:00
commit 24150ef8da
Signed by: tf-provider.git.onstackit.cloud
GPG key ID: 6D7E8A1ED8955A9C

View file

@ -2,19 +2,13 @@ package publish
import (
"fmt"
"strings"
)
func (p *Provider) ReadGpgFile() (string, error) {
// Get contents of GPG key
gpgFile, err := ReadFile(p.GpgPubKeyFile)
if err != nil {
return "", fmt.Errorf("error reading '%s' file: %w", p.GpgPubKeyFile, err)
}
// loop through every line and stick with \\n
gpgAsciiPub := ""
for _, line := range gpgFile {
gpgAsciiPub = gpgAsciiPub + line + "\\n"
}
return gpgAsciiPub, nil
return strings.Join(gpgFile, "\n"), nil
}