diff options
Diffstat (limited to 'tests/vercheck')
-rw-r--r-- | tests/vercheck/.gitignore | 1 | ||||
-rw-r--r-- | tests/vercheck/main.go | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/vercheck/.gitignore b/tests/vercheck/.gitignore new file mode 100644 index 0000000..f734c59 --- /dev/null +++ b/tests/vercheck/.gitignore @@ -0,0 +1 @@ +vercheck 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") + } +} |