Few questions regarding packaging stuffs ...
1/ What is the better way to get the version of the addon used in the buit package process ? I would like get this info inside snippets. How could I propagate this value.
Do I create a system setting for each snippet and initialize this value inside the packaging process (and in this case how could I initialize system setting for snippets )
or ...
2/ How could be initialized the value "provider" of the package installed. Sometimes we have modx.com, sometines nothing.
Thanks Romain. getVersionData gives the version of Revo (e.g: 2.1.0 RC3). What I would like is to propagate during the packaging installation the correct version of the addon.
I would like avoid to hard code the snippet version inside the files.
But may be I could use the PKG_VERSION and PKG_RELEASE constantes used in the build.transport.php file and then the appropriate resolver assign these values inside snippets system settings.
But I am not sure that this is the better way to do this. Any thought on this subject is welcome.
-
☆ A M B ☆
- 571 Posts
In that case why not just create the system setting on your own (beside the "automation", i can’t see any benefit from my seat)?