Reputation: 753
Does anyone know, how to retrieve the currently installed Shopware 6 version in an App Script?
Unfortunately I was not able to find anything in the docs or the code.
Upvotes: 0
Views: 171
Reputation: 3190
We added support to retrieve the current shopware version from app scripts. Refer to this commit.
Starting with 6.5.1.0 you can access the shopware.version
variable from inside app scripts and also use it in combination with version_compare
.
Upvotes: 1
Reputation: 13161
When you're in the dev
environment you can dump all available data within a script.
{% do debug.dump(hook) %}
When the script is executed you will find the dumped data under "Scripts" on the Symfony profile page of the corresponding request.
That being said I couldn't find anything relating to the current Shopware version in the available data of script hooks or by using the provided facade services. I'm fairly certain that, as of today, it's not possible to confirm the Shopware version using app scripts alone. If you're relying on that information please open an issue ticket, as it is a feature request that can likely be implemented in a reasonable time.
Upvotes: 1