Skip to content

Commit

Permalink
chore: go 1.21 support
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed Aug 30, 2023
1 parent b4be957 commit 7d95193
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 48 deletions.
5 changes: 2 additions & 3 deletions builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ func (b *Builder) Build(rrModule string) error { //nolint:gocyclo
}
}

// upgrade to 1.20
err = b.goModTidyCmd()
if err != nil {
return err
Expand Down Expand Up @@ -261,8 +260,8 @@ func (b *Builder) goBuildCmd(out string) error {
}

func (b *Builder) goModTidyCmd() error {
b.log.Info("[EXECUTING CMD]", zap.String("cmd", "go mod tidy -go=1.20"))
cmd := exec.Command("go", "mod", "tidy", "-go=1.20")
b.log.Info("[EXECUTING CMD]", zap.String("cmd", "go mod tidy"))
cmd := exec.Command("go", "mod", "tidy")
cmd.Stderr = b
err := cmd.Start()
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions builder/templates/templateV2023.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module github.com/roadrunner-server/roadrunner/{{.ModuleVersion}}
go 1.21
toolchain go1.21.0
require (
github.com/buger/goterm v1.0.4
github.com/dustin/go-humanize v1.0.1
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0=
github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
Expand Down
85 changes: 43 additions & 42 deletions velox_rr_v2023.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build_args = ['-trimpath', '-ldflags', '-s -X github.com/roadrunner-server/roadrunner/v2/internal/meta.version=${VERSION} -X github.com/roadrunner-server/roadrunner/v2/internal/meta.buildTime=${TIME}']

[roadrunner]
ref = "v2023.1.5"
ref = "master"

[github]
[github.token]
Expand All @@ -11,73 +11,74 @@ ref = "v2023.1.5"
# ref -> master, commit or tag
[github.plugins]
# LOGS
appLogger = { ref = "v4.0.4", owner = "roadrunner-server", repository = "app-logger" }
logger = { ref = "v4.1.3", owner = "roadrunner-server", repository = "logger" }
appLogger = { ref = "v4.0.10", owner = "roadrunner-server", repository = "app-logger" }
logger = { ref = "v4.2.1", owner = "roadrunner-server", repository = "logger" }
lock = { ref = "v4.4.0-beta.2", owner = "roadrunner-server", repository = "lock" }

# CENTRIFUGE BROADCASTING PLATFORM
centrifuge = { ref = "v4.1.2", owner = "roadrunner-server", repository = "centrifuge" }
centrifuge = { ref = "v4.3.0-beta.4", owner = "roadrunner-server", repository = "centrifuge" }

# WORKFLOWS ENGINE
temporal = { ref = "v4.2.1", owner = "temporalio", repository = "roadrunner-temporal" }
temporal = { ref = "v4.4.0-beta.5", owner = "temporalio", repository = "roadrunner-temporal" }

# METRICS
metrics = { ref = "v4.0.4", owner = "roadrunner-server", repository = "metrics" }
metrics = { ref = "v4.1.3", owner = "roadrunner-server", repository = "metrics" }

# HTTP + MIDDLEWARE
http = { ref = "v4.1.4", owner = "roadrunner-server", repository = "http" }
gzip = { ref = "v4.0.4", owner = "roadrunner-server", repository = "gzip" }
prometheus = { ref = "v4.0.5", owner = "roadrunner-server", repository = "prometheus" }
headers = { ref = "v4.0.4", owner = "roadrunner-server", repository = "headers" }
static = { ref = "v4.0.5", owner = "roadrunner-server", repository = "static" }
http = { ref = "v4.3.0-beta.5", owner = "roadrunner-server", repository = "http" }
gzip = { ref = "v4.1.1", owner = "roadrunner-server", repository = "gzip" }
prometheus = { ref = "v4.1.1", owner = "roadrunner-server", repository = "prometheus" }
headers = { ref = "v4.2.2", owner = "roadrunner-server", repository = "headers" }
static = { ref = "v4.1.2", owner = "roadrunner-server", repository = "static" }

# OpenTelemetry
otel = { ref = "v4.1.5", owner = "roadrunner-server", repository = "otel" }
otel = { ref = "v4.2.1", owner = "roadrunner-server", repository = "otel" }

# SERVER
server = { ref = "v4.1.1", owner = "roadrunner-server", repository = "server" }
server = { ref = "v4.3.0-beta.4", owner = "roadrunner-server", repository = "server" }

# SERVICE aka lightweit systemd
service = { ref = "v4.1.0", owner = "roadrunner-server", repository = "service" }
service = { ref = "v4.4.0-beta.2", owner = "roadrunner-server", repository = "service" }

# JOBS
jobs = { ref = "v4.3.2", owner = "roadrunner-server", repository = "jobs" }
amqp = { ref = "v4.4.3", owner = "roadrunner-server", repository = "amqp" }
sqs = { ref = "v4.2.3", owner = "roadrunner-server", repository = "sqs" }
beanstalk = { ref = "v4.2.2", owner = "roadrunner-server", repository = "beanstalk" }
nats = { ref = "v4.2.2", owner = "roadrunner-server", repository = "nats" }
kafka = { ref = "v4.1.4", owner = "roadrunner-server", repository = "kafka" }
jobs = { ref = "v4.6.0-beta.6", owner = "roadrunner-server", repository = "jobs" }
amqp = { ref = "v4.8.0-beta.2", owner = "roadrunner-server", repository = "amqp" }
sqs = { ref = "v4.5.0-beta.1", owner = "roadrunner-server", repository = "sqs" }
beanstalk = { ref = "v4.5.0-beta.1", owner = "roadrunner-server", repository = "beanstalk" }
nats = { ref = "v4.5.0-beta.1", owner = "roadrunner-server", repository = "nats" }
kafka = { ref = "v4.4.0-beta.3", owner = "roadrunner-server", repository = "kafka" }

# KV
kv = { ref = "v4.1.5", owner = "roadrunner-server", repository = "kv" }
boltdb = { ref = "v4.3.2", owner = "roadrunner-server", repository = "boltdb" }
memory = { ref = "v4.2.2", owner = "roadrunner-server", repository = "memory" }
redis = { ref = "v4.1.5", owner = "roadrunner-server", repository = "redis" }
memcached = { ref = "v4.1.5", owner = "roadrunner-server", repository = "memcached" }
kv = { ref = "v4.3.0-beta.2", owner = "roadrunner-server", repository = "kv" }
boltdb = { ref = "v4.6.0-beta.1", owner = "roadrunner-server", repository = "boltdb" }
memory = { ref = "v4.5.0-beta.1", owner = "roadrunner-server", repository = "memory" }
redis = { ref = "v4.2.2", owner = "roadrunner-server", repository = "redis" }
memcached = { ref = "v4.1.11", owner = "roadrunner-server", repository = "memcached" }

# FILESERVER (static files)
fileserver = { ref = "v4.0.5", owner = "roadrunner-server", repository = "fileserver" }
fileserver = { ref = "v4.1.1", owner = "roadrunner-server", repository = "fileserver" }

# gRPC plugin
grpc = { ref = "v4.1.5", owner = "roadrunner-server", repository = "grpc" }
grpc = { ref = "v4.4.0-beta.3", owner = "roadrunner-server", repository = "grpc" }

# HEALTHCHECKS + READINESS CHECKS
status = { ref = "v4.1.5", owner = "roadrunner-server", repository = "status" }
status = { ref = "v4.4.0-beta.1", owner = "roadrunner-server", repository = "status" }

# TCP for the RAW TCP PAYLOADS
tcp = { ref = "v4.0.4", owner = "roadrunner-server", repository = "tcp" }

[gitlab]
[gitlab.token]
# api, read-api, read-repo
token = "${GL_TOKEN}"

[gitlab.endpoint]
endpoint = "https://gitlab.com"

[gitlab.plugins]
# ref -> master, commit or tag
test_plugin_1 = { ref = "main", owner = "rustatian", repository = "36405203" }
test_plugin_2 = { ref = "main", owner = "rustatian", repository = "36405235" }
tcp = { ref = "v4.2.0-beta.3", owner = "roadrunner-server", repository = "tcp" }

#[gitlab]
# [gitlab.token]
# # api, read-api, read-repo
# token = "${GL_TOKEN}"
#
# [gitlab.endpoint]
# endpoint = "https://gitlab.com"
#
# [gitlab.plugins]
# # ref -> master, commit or tag
# test_plugin_1 = { ref = "main", owner = "rustatian", repository = "36405203" }
# test_plugin_2 = { ref = "main", owner = "rustatian", repository = "36405235" }

[log]
level = "debug"
Expand Down

0 comments on commit 7d95193

Please sign in to comment.