versioning-bundle icon indicating copy to clipboard operation
versioning-bundle copied to clipboard

Version var in config files

Open AndreiIgna opened this issue 6 years ago • 2 comments

I'm using this bundle, which is really helpful 👍🏼

I want to add the version number to assets, which needs to be configured like this:

# config/packages/framework.yaml
framework:
    # ...
    assets:
        version: 'v2'
        version: '%shivas_versioning.version%'

Is the version number available to use in config files? I haven't seen any info related to this, and after trying a few variable names couldn't make it work..

If it's not available for config files yet, would be a useful feature

AndreiIgna avatar Apr 16 '19 11:04 AndreiIgna

Currently the version not available as parameter for config files. It would be possible to do this, though it requires the VersionManager service to be available during container build. Currently it's not because of the used cache service which is configured using the parent attribute -- those services cannot be created during container build. Also custom providers or formatters that cannot be created during container build would prohibit this. Thus, if added, this feature should be optional.

dontub avatar Aug 04 '19 13:08 dontub

A workaround can be used during CI/CD steps which is to export the VERSION file content to an env variable : export APP_VERSION=cat VERSION then you can use %env(VERSION)% in your config this is useful also if you want to get version info in Command context

elghailani avatar Apr 28 '22 11:04 elghailani