mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-25 12:24:44 +02:00
fix(snap): ignore human review error msg
closes #2194 Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
parent
d08b767975
commit
00b76540ca
@ -330,7 +330,10 @@ func create(ctx *context.Context, snap config.Snapcraft, arch string, binaries [
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
const reviewWaitMsg = `Waiting for previous upload(s) to complete their review process.`
|
const (
|
||||||
|
reviewWaitMsg = `Waiting for previous upload(s) to complete their review process.`
|
||||||
|
humanReviewMsg = `A human will soon review your snap`
|
||||||
|
)
|
||||||
|
|
||||||
func push(ctx *context.Context, snap *artifact.Artifact) error {
|
func push(ctx *context.Context, snap *artifact.Artifact) error {
|
||||||
log := log.WithField("snap", snap.Name)
|
log := log.WithField("snap", snap.Name)
|
||||||
@ -339,7 +342,7 @@ func push(ctx *context.Context, snap *artifact.Artifact) error {
|
|||||||
/* #nosec */
|
/* #nosec */
|
||||||
cmd := exec.CommandContext(ctx, "snapcraft", "upload", "--release=stable", snap.Path)
|
cmd := exec.CommandContext(ctx, "snapcraft", "upload", "--release=stable", snap.Path)
|
||||||
if out, err := cmd.CombinedOutput(); err != nil {
|
if out, err := cmd.CombinedOutput(); err != nil {
|
||||||
if strings.Contains(string(out), reviewWaitMsg) {
|
if strings.Contains(string(out), reviewWaitMsg) || strings.Contains(string(out), humanReviewMsg) {
|
||||||
log.Warn(reviewWaitMsg)
|
log.Warn(reviewWaitMsg)
|
||||||
} else {
|
} else {
|
||||||
return fmt.Errorf("failed to push %s package: %s", snap.Path, string(out))
|
return fmt.Errorf("failed to push %s package: %s", snap.Path, string(out))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user