Get variables from dub.json
Steven Schveighoffer
schveiguy at gmail.com
Wed Mar 3 15:58:48 UTC 2021
On 3/3/21 7:50 AM, dog2002 wrote:
> How do I use variables (application version for example) from dub.json?
> Is it possible? For example, I want the application version to be printed.
AFAIK, that's not passed directly to the application. And the version is
not actually stored in the dub.json file (it's a tag on git). I think
you would have to use git to get the information.
If you want the versions of the dependencies, it's in the
dub.selections.json file. It's probably possible to import the file and
parse the json directly.
-Steve
More information about the Digitalmars-d
mailing list