matt1484 / bl3_auto_vip

Borderlands3 Auto VIP/Shift Code Redemption System
Apache License 2.0
81 stars 19 forks source link

Check for updates #17

Open BradLugo opened 5 years ago

BradLugo commented 5 years ago

Check GitHub release for updated binaries and prompt the users about the newer version

squatto commented 4 years ago

This already happens, actually. See here: https://github.com/matt1484/bl3_auto_vip/blob/87d814b6cdb8f977c5dfa2c48547711a05a03828/cmd/main.go#L271-L273

matt1484 commented 4 years ago

It’s not exactly the best way to check. I plan on changing it a bit at some point

squatto commented 4 years ago

This would actually be a really simple change:

  1. GET JSON from https://api.github.com/repos/matt1484/bl3_auto_vip/releases/latest
  2. Compare .tag_name to your version constant

You'd just need to make sure that your version constant matches your tag name.