From 9d4f6ffd8c33d2c31a549de0b1b54b4735191889 Mon Sep 17 00:00:00 2001
From: Samuel ORTION {{ "Disk usage"|trans }}
+
+ version: v +
\ No newline at end of file diff --git a/www/templates/today/index.html.twig b/www/templates/today/index.html.twig index b69dd5d..95f88af 100644 --- a/www/templates/today/index.html.twig +++ b/www/templates/today/index.html.twig @@ -1,31 +1,38 @@ -{% extends "base.html.twig" %} +{% extends 'base.html.twig' %} {% block content %} -{{ "No species detected this day" | trans }}
- {% endif %} ++ {{ 'No species detected this day'|trans }} +
+ {% endif %} {% endblock %} diff --git a/www/webpack.config.js b/www/webpack.config.js index 672c56b..8c09f01 100644 --- a/www/webpack.config.js +++ b/www/webpack.config.js @@ -1,4 +1,7 @@ const Encore = require('@symfony/webpack-encore'); +const { DefinePlugin } = require('webpack'); +const { GitRevisionPlugin } = require('git-revision-webpack-plugin'); +const gitRevisionPlugin = new GitRevisionPlugin({lightweightTags: true}); // Manually configure the runtime environment if not already configured yet by the "encore" command. // It's useful when you use tools that rely on webpack.config.js file. @@ -73,6 +76,14 @@ Encore // uncomment if you're having problems with a jQuery plugin //.autoProvidejQuery() -; + + .addPlugin( + new DefinePlugin( + { + VERSION: JSON.stringify(gitRevisionPlugin.version()), + } + ) + ) + ; module.exports = Encore.getWebpackConfig(); diff --git a/www/yarn.lock b/www/yarn.lock index 9793098..736d3a8 100644 --- a/www/yarn.lock +++ b/www/yarn.lock @@ -2365,6 +2365,11 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +git-revision-webpack-plugin@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/git-revision-webpack-plugin/-/git-revision-webpack-plugin-5.0.0.tgz#0683a6a110ece618499880431cd89e1eb597b536" + integrity sha512-RptQN/4UKcEPkCBmRy8kLPo5i8MnF8+XfAgFYN9gbwmKLTLx4YHsQw726H+C5+sIGDixDkmGL3IxPA2gKo+u4w== + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"