How to properly handle versions in an addon?
#1
I've got my ICanHasCheezburger addon working, but one thing is bugging me for maintenance.

I currently have to set the version in addon.xml, addon.py and the settings.xml.

addon.xml
Code:
<addon id="plugin.image.icanhascheezburger.com" name="ICanHasCheezburger.com" version="0.4" provider-name="bmillham">


addon.py
Code:
__plugin__  = "ICanHasCheezburger.com"
__author__  = "Brian Millham <[email protected]>"
__url__     = "http://github.com/bmillham/plugin.pictures.icanhascheezburger.com"
__website__ = "http://github.com/bmillham/plugin.pictures.icanhascheezburger.com"
__date__    = "20 August 2010"
__version__ = "0.4"

and settings.xml
Code:
<setting id="version" type="text" label="30100" default="0.4" enable="false" />
<setting id="author" type="text" label="30101" default="Brian Millham <[email protected]>" enable="false" />
<setting id="website" type="text" label="30102" default="http://github.com/bmillham/plugin.pictures.icanhascheezburger.com" enable="false" />

I've got to be making this more difficult than it has to be! What's the best way to handle this?

Brian
Reply
#2
I don't believe you need the version number in settings.xml.
I'm not even sure if it is truely needed in anything but the addon.xml file. Though having it in the python file helps troubleshooting..

I have often forget to update to update my script's default.py with the new version..
Reply
#3
You don't need it anywhere other than the addon.xml file.

You should be able to get the version info for logging purposes from getAddonInfo ?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
giftie Wrote:I don't believe you need the version number in settings.xml.
I'm not even sure if it is truely needed in anything but the addon.xml file. Though having it in the python file helps troubleshooting..

I have often forget to update to update my script's default.py with the new version..

I have it in the settings.xml just so it shows when configuring the addon. With the new addon system, I don't think it's really needed there, so that's one spot to get rid of the extra version.

I'm making no use of the info in the python file either, so that's going bye-bye in the next release Laugh I don't know why I thought that I had to have the version in all three places.... (Probably leftover from the original plugin I developed, and I didn't understand then where the proper spot for versions were)

And forgetting to update versions is exactly why I want to simplify this Laugh

Thanks, Brian
Reply
#5
jmarshall Wrote:You don't need it anywhere other than the addon.xml file.

You should be able to get the version info for logging purposes from getAddonInfo ?
I just checked the Wiki, and it doesn't have any info about exactly what getAddonInfo returns. Any info on this, or will I just have to experiment Nod
Reply
#6
Grab the pydocs script and run that perhaps? Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
How to properly handle versions in an addon?0