+1 to Josh's idea that we provide bead with logic which serves version. Thanks, Piotr
On Tue, Apr 30, 2019, 8:18 PM Kessler CTR Mark J <[email protected]> wrote: > As an example, here is how to access the version number in other > languages. Some easier to use than others. Looks like the easiest ones > are just static const strings. > > Flex[1]: mx.core.FlexVersion.CURRENT_VERSION > Dotnet[2]: System.Environment.Version > Java[3]:System.getProperty("java.version"); > React[4]: React.version > Angular[5]: import { VERSION } from '@angular/core'; VERSION.full > Groovy[6]: GroovySystem.getVersion(); > Ruby[7]: RUBY_VERSION > Python[8]: sys.version > Node.Js[9]: process.version > PHP[10]: phpversion() > > > So I would like the SDK to provide something similar. It looks like we > still have a mechanism setup in the build.xml we are just missing the files > it's looking for (Version.as files). Let's add the following file and see > if it with a little tweak in pathing would turn it into a self-managing > version file when building the SDK for release. This looks like a smallest > simplest mechanism to implement this. Especially since it's regex pattern > matching the old version format, it doesn't matter how we layout the file. > > File: Version.as > > package org.apache.royale.core > { > public class Version > { > public static const CURRENT_VERSION:String = "0.9.6.0"; > } > } > > > SDK Usage for developer: > Import org.apache.core.Version; > trace(Version.CURRENT_VERSION); > > > [1] https://flex.apache.org/asdoc/mx/core/FlexVersion.html > [2] > https://docs.microsoft.com/en-us/dotnet/api/system.environment.version?view=netframework-4.8 > [3] > https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html > [4] > https://stackoverflow.com/questions/36994564/how-can-one-tell-the-version-of-react-running-at-runtime-in-the-browser > [5] > https://stackoverflow.com/questions/36456843/how-to-check-angular2-version-with-typescript > [6] > http://docs.groovy-lang.org/latest/html/api/groovy/lang/GroovySystem.html > [7] > https://stackoverflow.com/questions/1589751/determine-ruby-version-from-within-rails > [8] https://docs.python.org/3/library/sys.html > [9] https://nodejs.org/api/process.html#process_process_version > [10] https://www.php.net/manual/en/function.phpversion.php > > > -Mark K > > > -----Original Message----- > From: Carlos Rovira [mailto:[email protected]] > Sent: Tuesday, April 30, 2019 10:37 AM > To: [email protected] > Subject: Re: [Non-DoD Source] Re: Version property (was: Let's bump Royale > version to 1.0) > > Hi Mark, > > sorry but all you state can be solved with the solution I exposed to you. > There's no need to add an identifier to an SDK since you can add it > yourself from the SDK you downloaded or get by the multiple ways available. > In any of the cases the numbers are not baked into code, but are available > in different parts and you can use defines to bake it into your code and > use it in the same way you use to do in Flex. At least I don't see from > your response that your points will not be covered in that way >
