Skip to content

Commit d1b868e

Browse files
authored
[#37]: feat: compatibility with roadrunner v2.11.0
2 parents 69ccdee + 6e43b5b commit d1b868e

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

builder/builder.go

+14-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ import (
1515

1616
const (
1717
// path to the file which should be generated from the template
18-
pluginsPath string = "/internal/container/plugins.go"
18+
pluginsPath string = "/container/plugins.go"
1919
letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
2020
goModStr string = "go.mod"
2121
pluginStructureStr string = "Plugin{}"
2222
rrMainGo string = "cmd/rr/main.go"
2323
executableName string = "rr"
24+
// cleanup pattern
25+
cleanupPattern string = "roadrunner-server*"
2426
)
2527

2628
type Builder struct {
@@ -62,12 +64,23 @@ func (b *Builder) Build() error { //nolint:gocyclo
6264
return err
6365
}
6466

67+
b.log.Debug("[RESULTING TEMPLATE]", zap.String("template", buf.String()))
68+
6569
f, err := os.Open(b.rrTempPath)
6670
if err != nil {
6771
return err
6872
}
6973
defer func() {
7074
_ = f.Close()
75+
files, errGl := filepath.Glob(filepath.Join(os.TempDir(), cleanupPattern))
76+
if errGl != nil {
77+
return
78+
}
79+
80+
for i := 0; i < len(files); i++ {
81+
b.log.Info("[CLEANING UP]", zap.String("file/folder", files[i]))
82+
_ = os.RemoveAll(files[i])
83+
}
7184
}()
7285

7386
// remove old plugins.go

vx/main.go cmd/vx/main.go

File renamed without changes.

velox.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
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}']
33

44
[roadrunner]
5-
ref = "v2.10.5"
5+
ref = "master"
66

77
[github]
88
[github.token]

0 commit comments

Comments
 (0)