Skip to content

Commit 7535f31

Browse files
authored
fix(postgresql): Structure plugin so version is embedded by Go Releaser (#2947)
#### Summary Fixes #2642 <!--
1 parent 788a36d commit 7535f31

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

plugins/destination/postgresql/main.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"github.com/cloudquery/cloudquery/plugins/destination/postgresql/client"
5+
"github.com/cloudquery/cloudquery/plugins/destination/postgresql/resources/plugin"
56
"github.com/cloudquery/plugin-sdk/plugins"
67
"github.com/cloudquery/plugin-sdk/serve"
78
)
@@ -10,11 +11,7 @@ const (
1011
sentryDSN = "https://19d1257d36854a51b17c06614e76dc2d@o1396617.ingest.sentry.io/4503896817336320"
1112
)
1213

13-
var (
14-
Version = "Development"
15-
)
16-
1714
func main() {
18-
p := plugins.NewDestinationPlugin("postgresql", Version, client.New)
15+
p := plugins.NewDestinationPlugin("postgresql", plugin.Version, client.New)
1916
serve.Destination(p, serve.WithDestinationSentryDSN(sentryDSN))
2017
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package plugin
2+
3+
var (
4+
// Don't move this file to a different package, it's used by Go releaser to embed the version in the binary.
5+
Version = "Development"
6+
)

0 commit comments

Comments
 (0)