diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-11-12 20:18:41 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-23 21:51:25 +0100 |
commit | b15c31bdf47c2db5d95049090a5fd099ae1c1e02 (patch) | |
tree | d906f59048dd218490467594358432df6b3a8494 /tests/vercheck | |
parent | b3453bbea901ed02ce3b458883f2f8ab03afc161 (diff) |
[feat] simple update check
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") + } +} |