Best way to keep track of Plugin versioning; code updates

Posted on
Thu Nov 15, 2018 5:15 am
GlennNZ offline
User avatar
Posts: 1570
Joined: Dec 07, 2014
Location: Central Coast, Australia

Best way to keep track of Plugin versioning; code updates

Hi all,

Interested in thoughts as to ‘best practice’ to keep track of plugin version. e.g alllowing updating / special updates to be run when new version has just been installed? (as opposed to restarted/reloaded)

Hidden pluginprefs version?
Versus file saved info?

Seem to the two approaches that would make sense/have been used. Leaning towards the first approach from simplicity standpoint.

But interested in any pointers?

Tah

Glenn
Last edited by GlennNZ on Thu Nov 15, 2018 5:47 pm, edited 1 time in total.

Posted on
Thu Nov 15, 2018 8:23 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Best way to keep track of versioning, when special updat

Hidden pluginprefs version?

That is what I do and has served me well... it just checks the version on load and calls the upgrade routine. That routine then needs to check the old version and process any updates going forward, keeping in mind that the user may have skipped versions on you (in other word, may have a couple of "versions" of upgrade code to run). Once complete, it updates the pref tracking the last version.

Adam

Posted on
Thu Nov 15, 2018 9:40 am
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Best way to keep track of versioning, when special updat

I wouldn't spend a lot of time on adding plugin update management features. 7.3 will see some version notification improvements in the Mac Client, and we'll eventually get to full upgrade management built-in.

I'd recommend spending time on plugin features, documentation, etc. - things that we can't really help you with.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Nov 15, 2018 9:44 am
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Best way to keep track of versioning, when special updat

If you're talking about changes to devices, events, and actions that your plugin supports, then using an object version number is probably the right way to go - you can then just build a table of conversions that need to be applied to any given version to upgrade it to the latest.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Nov 15, 2018 10:25 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Best way to keep track of versioning, when special updat

I wouldn't spend a lot of time on adding plugin update management features. 7.3 will see some version notification improvements in the Mac Client, and we'll eventually get to full upgrade management built-in.

If you're talking about changes to devices, events, and actions that your plugin supports, then using an object version number is probably the right way to go - you can then just build a table of conversions that need to be applied to any given version to upgrade it to the latest

Yeah, that is what I was talking about, but at the plugin level - setting up new features / properties, etc. I do something similar at the device level to detect upgrades needed there. That doesn't take any time at all to implement.

Posted on
Thu Nov 15, 2018 5:18 pm
GlennNZ offline
User avatar
Posts: 1570
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Best way to keep track of versioning, when special updat

RogueProeliator wrote:
Hidden pluginprefs version?

That is what I do and has served me well... it just checks the version on load and calls the upgrade routine. That routine then needs to check the old version and process any updates going forward, keeping in mind that the user may have skipped versions on you (in other word, may have a couple of "versions" of upgrade code to run). Once complete, it updates the pref tracking the last version.
Adam


Great - thanks all for the advice.
Have got on and implemented.

Glenn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 17 guests