Skip to content

Commit 051ce13

Browse files
authored
[#147]: release: v2024.1.0
2 parents da4f143 + 18d0f93 commit 051ce13

File tree

22 files changed

+238
-97
lines changed

22 files changed

+238
-97
lines changed

.github/workflows/linters.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
- name: Run linter
1919
uses: golangci/[email protected] # Action page: <https://github.com/golangci/golangci-lint-action>
2020
with:
21-
version: v1.54 # without patch version
21+
version: v1.57 # without patch version
2222
only-new-issues: false # show only new issues if it's a pull request
2323
args: --timeout=10m --build-tags=race

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ jobs:
7979
TIME: ${{ secrets.TIME }}
8080
run: |
8181
go install github.com/roadrunner-server/velox/cmd/vx@latest
82-
vx build -c velox_rr_v2023.toml -o="."
82+
vx build -c velox_rr_v2024.toml -o="."
8383
./rr --version

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ jobs:
6363
CGO_ENABLED: 0
6464
LDFLAGS: >-
6565
-s
66-
-X github.com/roadrunner-server/velox/internal/version.version=${{ steps.values.outputs.version }}
67-
-X github.com/roadrunner-server/velox/internal/version.buildTime=${{ steps.values.outputs.timestamp }}
66+
-X github.com/roadrunner-server/velox/v2024/internal/version.version=${{ steps.values.outputs.version }}
67+
-X github.com/roadrunner-server/velox/v2024/internal/version.buildTime=${{ steps.values.outputs.timestamp }}
6868
run: |
6969
go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/vx
7070
stat "./${{ steps.values.outputs.binary-name }}"
@@ -92,7 +92,7 @@ jobs:
9292
- name: Create distributive
9393
run: |
9494
mkdir ${{ steps.dist-dir.outputs.name }}
95-
rm velox.toml && mv velox_rr_v2023.toml velox.toml
95+
rm velox.toml && mv velox_rr_v2024.toml velox.toml
9696
mv "./${{ steps.values.outputs.binary-name }}" ./${{ steps.dist-dir.outputs.name }}/
9797
cp ./README.md ./LICENSE ./velox.toml ./${{ steps.dist-dir.outputs.name }}/
9898
@@ -165,5 +165,10 @@ jobs:
165165
tags: |
166166
spiralscout/velox:latest
167167
spiralscout/velox:${{ steps.values.outputs.version }}
168+
spiralscout/velox:2024.1
169+
spiralscout/velox:2024
170+
168171
ghcr.io/roadrunner-server/velox:latest
169172
ghcr.io/roadrunner-server/velox:${{ steps.values.outputs.version }}
173+
ghcr.io/roadrunner-server/velox:2024.1
174+
ghcr.io/roadrunner-server/velox:2024

.golangci.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,11 @@
33
run:
44
go: '1.17'
55
timeout: 1m
6-
skip-dirs:
7-
- .github
8-
- .git
96
allow-parallel-runners: true
107

11-
output:
12-
format: colored-line-number # colored-line-number|line-number|json|tab|checkstyle|code-climate
13-
148
linters-settings:
159
wsl:
1610
allow-assign-and-anything: true
17-
govet:
18-
check-shadowing: true
19-
golint:
20-
min-confidence: 0.1
2111
godot:
2212
scope: declarations
2313
capital: true
@@ -35,7 +25,6 @@ linters-settings:
3525
range-loops: true
3626
for-loops: true
3727
nolintlint:
38-
allow-leading-space: false
3928
require-specific: true
4029

4130
linters: # All available linters list: <https://golangci-lint.run/usage/linters/>
@@ -76,6 +65,9 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/
7665
- whitespace # Tool for detection of leading and trailing whitespace
7766

7867
issues:
68+
exclude-dirs:
69+
- .github
70+
- .git
7971
exclude-rules:
8072
- path: _test\.go
8173
linters:

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ WORKDIR /src
1212

1313
# arguments to pass on each go tool link invocation
1414
ENV LDFLAGS="-s \
15-
-X github.com/roadrunner-server/velox/internal/version.version=$APP_VERSION \
16-
-X github.com/roadrunner-server/velox/internal/version.buildTime=$BUILD_TIME"
15+
-X github.com/roadrunner-server/velox/v2024/internal/version.version=$APP_VERSION \
16+
-X github.com/roadrunner-server/velox/v2024/internal/version.buildTime=$BUILD_TIME"
1717

1818
# verbose
1919
RUN set -x

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
1. ⚠️ Do not use the plugin's `master` branch.
2222
2. ⚠️ Use tags with the **same** **major** version (e.g `logger` v3.0.3 + `amqp` v3.0.5, but not `logger` v4.0.0 + `amqp` v3.0.5)
2323
3. ⚠️ **Currently supported plugins version is: `v4.x.x`**
24-
4. ⚠️ **Currently supported RR version is: `>=v2023.x.x`**
24+
4. ⚠️ **Currently supported RR version is: `>=v2024.x.x`**
2525

2626
# Docs: [link](https://docs.roadrunner.dev/customization/build)

builder/builder.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"syscall"
1414

1515
"github.com/hashicorp/go-version"
16-
"github.com/roadrunner-server/velox"
17-
"github.com/roadrunner-server/velox/builder/templates"
16+
"github.com/roadrunner-server/velox/v2024"
17+
"github.com/roadrunner-server/velox/v2024/builder/templates"
1818
"go.uber.org/zap"
1919
)
2020

@@ -75,6 +75,11 @@ func (b *Builder) Build(rrModule string) error { //nolint:gocyclo
7575

7676
// compatibility with version 2
7777
switch t.ModuleVersion {
78+
case velox.V2024:
79+
err = templates.CompileTemplateV2024(buf, t)
80+
if err != nil {
81+
return err
82+
}
7883
case velox.V2023:
7984
err = templates.CompileTemplateV2023(buf, t)
8085
if err != nil {
@@ -133,6 +138,11 @@ func (b *Builder) Build(rrModule string) error { //nolint:gocyclo
133138

134139
// compatibility with version 2
135140
switch t.ModuleVersion {
141+
case velox.V2024:
142+
err = templates.CompileGoModTemplate2024(buf, t)
143+
if err != nil {
144+
return err
145+
}
136146
case velox.V2023:
137147
err = templates.CompileGoModTemplate2023(buf, t)
138148
if err != nil {
@@ -200,7 +210,7 @@ func (b *Builder) Write(d []byte) (int, error) {
200210
func validateModule(module string) (string, error) {
201211
if module == "master" {
202212
// default branch
203-
return velox.V2023, nil
213+
return velox.V2024, nil
204214
}
205215

206216
v, err := version.NewVersion(module)

builder/builder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"path"
66
"testing"
77

8-
"github.com/roadrunner-server/velox"
8+
"github.com/roadrunner-server/velox/v2024"
99
"go.uber.org/zap"
1010
)
1111

builder/template_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"bytes"
55
"testing"
66

7-
"github.com/roadrunner-server/velox/builder/templates"
7+
"github.com/roadrunner-server/velox/v2024/builder/templates"
88
"github.com/stretchr/testify/require"
99
)
1010

builder/templates/entry.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,31 @@ func CompileGoModTemplate2023(buf *bytes.Buffer, data *Template) error {
7979

8080
return nil
8181
}
82+
83+
func CompileTemplateV2024(buf *bytes.Buffer, data *Template) error {
84+
tmplt, err := template.New("plugins.go").Parse(PluginsTemplateV2024)
85+
if err != nil {
86+
return err
87+
}
88+
89+
err = tmplt.Execute(buf, data)
90+
if err != nil {
91+
return err
92+
}
93+
94+
return nil
95+
}
96+
97+
func CompileGoModTemplate2024(buf *bytes.Buffer, data *Template) error {
98+
tmplt, err := template.New("go.mod").Parse(GoModTemplateV2024)
99+
if err != nil {
100+
return err
101+
}
102+
103+
err = tmplt.Execute(buf, data)
104+
if err != nil {
105+
return err
106+
}
107+
108+
return nil
109+
}

0 commit comments

Comments
 (0)