1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-26 04:22:05 +02:00

fix: telegram default message (#4821)

Hi, there is another fix of default message. I tried this message, now
everything works
This commit is contained in:
Stepan Rabotkin 2024-05-03 02:37:15 +03:00 committed by GitHub
parent 2a5c322969
commit 7982a33a06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 11 deletions

3
go.mod
View File

@ -25,7 +25,7 @@ require (
github.com/dghubble/go-twitter v0.0.0-20211115160449-93a8679adecb
github.com/dghubble/oauth1 v0.7.3
github.com/distribution/distribution/v3 v3.0.0-alpha.1
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1
github.com/google/go-containerregistry v0.19.1
github.com/google/go-github/v61 v61.0.0
github.com/google/ko v0.15.2
@ -279,7 +279,6 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.18.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect
github.com/vbatts/tar-split v0.11.5 // indirect

6
go.sum
View File

@ -347,8 +347,8 @@ github.com/go-restruct/restruct v1.2.0-alpha/go.mod h1:KqrpKpn4M8OLznErihXTGLlsX
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible h1:2cauKuaELYAEARXRkq2LrJ0yDDv1rW7+wrTEdVL3uaU=
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM=
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 h1:wG8n/XJQ07TmjbITcGiUaOtXxdrINDz1b0J1w0SzqDc=
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1/go.mod h1:A2S0CWkNylc2phvKXWBBdD3K0iGnDBGbzRpISP2zBl8=
github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
@ -761,8 +761,6 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM=
github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog=
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0=
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs=
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 h1:nrZ3ySNYwJbSpD6ce9duiP+QkD3JuLCcWkdaehUS/3Y=

View File

@ -6,13 +6,13 @@ import (
"github.com/caarlos0/env/v11"
"github.com/caarlos0/log"
api "github.com/go-telegram-bot-api/telegram-bot-api"
api "github.com/go-telegram-bot-api/telegram-bot-api/v5"
"github.com/goreleaser/goreleaser/internal/tmpl"
"github.com/goreleaser/goreleaser/pkg/context"
)
const (
defaultMessageTemplate = `{{ mdv2escape .ProjectName }} {{ mdv2escape .Tag }} is out! Check it out at {{ mdv2escape .ReleaseURL }}`
defaultMessageTemplate = `{{ mdv2escape .ProjectName }} {{ mdv2escape .Tag }} is out{{ mdv2escape "!" }} Check it out at {{ mdv2escape .ReleaseURL }}`
parseModeHTML = "HTML"
parseModeMarkdown = "MarkdownV2"
)

View File

@ -116,6 +116,6 @@ func TestGetMessageDetails(t *testing.T) {
require.NoError(t, Pipe{}.Default(ctx))
msg, _, err := getMessageDetails(ctx)
require.NoError(t, err)
require.Equal(t, "foo v1\\.0\\.0 is out! Check it out at ", msg)
require.Equal(t, "foo v1\\.0\\.0 is out\\! Check it out at ", msg)
})
}

View File

@ -25,9 +25,9 @@ announce:
# Message template to use while publishing.
#
# Default: '{{ mdv2escape .ProjectName }} {{ mdv2escape .Tag }} is out! Check it out at {{ mdv2escape .ReleaseURL }}'
# Default: '{{ mdv2escape .ProjectName }} {{ mdv2escape .Tag }} is out{{ mdv2escape "!" }} Check it out at {{ mdv2escape .ReleaseURL }}'
# Templates: allowed
message_template: 'Awesome project {{.Tag}} is out!'
message_template: 'Awesome project {{.Tag}} is out{{ mdv2escape "!" }}'
# Parse mode.
#