-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
44 lines (40 loc) · 1.13 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package main
import (
"log"
"os"
"github.com/go-semantic-release/mock-plugin/mock"
"github.com/go-semantic-release/semantic-release/v2/pkg/analyzer"
"github.com/go-semantic-release/semantic-release/v2/pkg/condition"
"github.com/go-semantic-release/semantic-release/v2/pkg/generator"
"github.com/go-semantic-release/semantic-release/v2/pkg/hooks"
"github.com/go-semantic-release/semantic-release/v2/pkg/plugin"
"github.com/go-semantic-release/semantic-release/v2/pkg/provider"
"github.com/go-semantic-release/semantic-release/v2/pkg/updater"
)
var version = "dev"
func main() {
mockPlugin := &mock.Mock{
PluginVersion: version,
Log: log.New(os.Stderr, "", 0),
}
plugin.Serve(&plugin.ServeOpts{
CommitAnalyzer: func() analyzer.CommitAnalyzer {
return mockPlugin
},
CICondition: func() condition.CICondition {
return mockPlugin
},
ChangelogGenerator: func() generator.ChangelogGenerator {
return mockPlugin
},
Provider: func() provider.Provider {
return mockPlugin
},
FilesUpdater: func() updater.FilesUpdater {
return mockPlugin
},
Hooks: func() hooks.Hooks {
return mockPlugin
},
})
}