summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/backend/bitmask.go2
-rw-r--r--pkg/backend/status.go1
-rw-r--r--pkg/config/version/gen.go3
-rw-r--r--pkg/config/version/genver/gen.go3
-rw-r--r--pkg/config/version/genver/main.go (renamed from pkg/config/version/main.go)2
5 files changed, 7 insertions, 4 deletions
diff --git a/pkg/backend/bitmask.go b/pkg/backend/bitmask.go
index feff115..2b58859 100644
--- a/pkg/backend/bitmask.go
+++ b/pkg/backend/bitmask.go
@@ -6,6 +6,7 @@ import (
"0xacab.org/leap/bitmask-vpn/pkg/bitmask"
"0xacab.org/leap/bitmask-vpn/pkg/config"
+ "0xacab.org/leap/bitmask-vpn/pkg/config/version"
)
func initializeBitmask() {
@@ -58,6 +59,7 @@ func initializeContext(provider, appName string) {
DonateURL: config.DonateURL,
AskForDonations: wantDonations(),
DonateDialog: false,
+ Version: version.VERSION,
Status: st,
}
go trigger(OnStatusChanged)
diff --git a/pkg/backend/status.go b/pkg/backend/status.go
index 6b13dd3..84b27b7 100644
--- a/pkg/backend/status.go
+++ b/pkg/backend/status.go
@@ -34,6 +34,7 @@ type connectionCtx struct {
AskForDonations bool `json:"askForDonations"`
DonateDialog bool `json:"donateDialog"`
DonateURL string `json:"donateURL"`
+ Version string `json:"version"`
Status status `json:"status"`
bm bitmask.Bitmask
cfg *config.Config
diff --git a/pkg/config/version/gen.go b/pkg/config/version/gen.go
deleted file mode 100644
index 334ed50..0000000
--- a/pkg/config/version/gen.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package main
-
-//go:generate go run . -output version.go
diff --git a/pkg/config/version/genver/gen.go b/pkg/config/version/genver/gen.go
new file mode 100644
index 0000000..e453824
--- /dev/null
+++ b/pkg/config/version/genver/gen.go
@@ -0,0 +1,3 @@
+package main
+
+//go:generate go run . -output ../version.go
diff --git a/pkg/config/version/main.go b/pkg/config/version/genver/main.go
index a86b619..e0d80b0 100644
--- a/pkg/config/version/main.go
+++ b/pkg/config/version/genver/main.go
@@ -13,7 +13,7 @@ import (
)
var (
- flPackageName = flag.String("package", "main", "name for the generated golang package")
+ flPackageName = flag.String("package", "version", "name for the generated golang package")
flVariableName = flag.String("variable", "VERSION", "variable name in the generated golang package")
flOutputFile = flag.String("output", "", "output filename (default stdout)")
)