Most efficient way of letting user know there was a update to your addon?

I was thinking about doing it with

http.Fetch but I think that makes it too complicated.

How else are you going to determine if there’s a newer version?
The way I generally see people do it is have a version file in your addon that uniquely identifies each release, then you can compare to a site you host your releases on, e.g. GitHub.

Where else did you plan on getting your update information from? I don’t think there’s any other way.

[editline]30th October 2016[/editline]

I mean the other way is to host it on the workshop and use the steamworks API to determine if the “updated” timestamp is higher than the last time you checked, but if you host it on the workshop it will auto update anyway.

Oh, I see. I forgot about the GitHub releases thingy. I guess I’ll have to try that, thanks! But how would I go about making it display only once? Convars perhaps?

[editline]30th October 2016[/editline]

I thought I could do it with convars, but then common sense kicked in. Welp, I’ll probably use Github’s web API, since I believe most of Steam’s is more complicated than it needs to be. Thanks!

It is good practice to keep a version manifest in your script if it is more then a few lines of code, all you need to do is do a check if the old version is lower then the new.
No need to use web api’s and http stuff when you can just use a single data file like such:
[lua]
CurrentVer = 1.1
local OldVer = file.Read( “addonnameversion.txt”, “DATA” )
if(OldVer and (tonumber(OldVer) or CurrentVer) < CurrentVer){
print(“You have been updated to version “…CurrentVer…”.”)
file.Write( “addonnameversion.txt”, CurrentVer )
}
[/lua]
Untested, but should serve your purpose.

I’m doing mixture of this and checking the latest version on GitHub, y’know, incase the user is offline for whatever reason. Really appreciate it! :weeb: