summaryrefslogtreecommitdiff
path: root/tests/vercheck/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vercheck/main.go')
-rw-r--r--tests/vercheck/main.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/vercheck/main.go b/tests/vercheck/main.go
new file mode 100644
index 0000000..bc8e04e
--- /dev/null
+++ b/tests/vercheck/main.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+ "0xacab.org/leap/bitmask-vpn/pkg/config/version"
+ "fmt"
+)
+
+func main() {
+ fmt.Println("Testing version upgrade (checks network)")
+ fmt.Println("-> set DEBUG=1 for details")
+ u := version.CanUpgrade()
+ switch {
+ case u:
+ fmt.Println("can upgrade")
+ case !u:
+ fmt.Println("no new version available")
+ }
+}